From 3f65005339ee198636e365c84d6b204aadc7fd30 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 16 Jan 2014 18:46:51 +0100 Subject: [PATCH] CControlAPI:: epgsearchxml fix time format --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index 2c29ca2b6..186501960 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -1352,6 +1352,7 @@ void CControlAPI::EpgSearchCGI(CyhookHandler *hh, bool xml_forat ) CShortEPGData epg; CEPGData longepg; char tmpstr[256] ={0}; + std::string genere; CChannelEventList::iterator eventIterator; unsigned int u_azeit = ( azeit > -1)? azeit:0; for (eventIterator = evtlist.begin(); eventIterator != evtlist.end(); ++eventIterator){ @@ -1368,13 +1369,14 @@ void CControlAPI::EpgSearchCGI(CyhookHandler *hh, bool xml_forat ) if (CEitManager::getInstance()->getEPGid(eventIterator->eventID, eventIterator->startTime, &longepg)) { hh->printf("\t\t%u\n", longepg.fsk); if (longepg.contentClassification.length()> 0){ - std::string genere = GetGenre(longepg.contentClassification[0]); - hh->printf("\t\t%s\n", ZapitTools::UTF8_to_UTF8XML(genere.c_str()).c_str()); + genere = GetGenre(longepg.contentClassification[0]); + genere = ZapitTools::UTF8_to_UTF8XML(genere.c_str()); + hh->printf("\t\t%s\n", genere.c_str()); } } strftime(tmpstr, sizeof(tmpstr), "%Y-%m-%d", tmStartZeit ); hh->printf("\t\t%s\n", tmpstr); - strftime(tmpstr, sizeof(tmpstr), ". %H:%M", tmStartZeit ); + strftime(tmpstr, sizeof(tmpstr), "%H:%M", tmStartZeit ); hh->printf("\t\t\n", tmpstr); hh->printf("\t\t%d\n", eventIterator->duration); hh->printf("\t\t\t" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "\n",eventIterator->channelID); @@ -1396,6 +1398,14 @@ void CControlAPI::EpgSearchCGI(CyhookHandler *hh, bool xml_forat ) hh->WriteLn(epg.info1); if(!epg.info2.empty()) hh->WriteLn(epg.info2); + if (CEitManager::getInstance()->getEPGid(eventIterator->eventID, eventIterator->startTime, &longepg)) { + hh->printf("fsk:%u\n", longepg.fsk); + if (longepg.contentClassification.length()> 0){ + genere = GetGenre(longepg.contentClassification[0]); + genere = ZapitTools::UTF8_to_UTF8XML(genere.c_str()); + hh->WriteLn(genere); + } + } hh->WriteLn("----------------------------------------------------------"); }