diff --git a/src/zapit/include/zapit/bouquets.h b/src/zapit/include/zapit/bouquets.h index 004e2d2d9..07204c20c 100644 --- a/src/zapit/include/zapit/bouquets.h +++ b/src/zapit/include/zapit/bouquets.h @@ -111,6 +111,7 @@ class CBouquetManager t_channel_id reMapEpgID(t_channel_id channelid); std::string reMapEpgXML(t_channel_id channelid); void convert_E2_EPGMapping(std::string mapfile_in, std::string mapfile_out = "/tmp/epgmap.xml"); + void dump_EPGMapping(std::string mapfile_out = "/tmp/epgmap.xml"); //logo downloads static void* LogoThread(void* _logolist); pthread_t thrLogo; diff --git a/src/zapit/src/bouquets.cpp b/src/zapit/src/bouquets.cpp index 3792c5273..96c3768eb 100644 --- a/src/zapit/src/bouquets.cpp +++ b/src/zapit/src/bouquets.cpp @@ -1357,6 +1357,33 @@ void CBouquetManager::convert_E2_EPGMapping(std::string mapfile_in, std::string xmlFreeDoc(epgmap_parser); } +void CBouquetManager::dump_EPGMapping(std::string mapfile_out) +{ + FILE * outfile = NULL; + CBouquetManager::ChannelIterator cit = g_bouquetManager->tvChannelsBegin(); + + outfile = fopen(mapfile_out.c_str(), "w"); + + fprintf(outfile, + "\n" + "\n"); + + for (; !(cit.EndOfChannels()); cit++) + { + if ((*cit)->getChannelID() != (*cit)->getEpgID()) + fprintf(outfile,"\t --%s\n",(*cit)->getChannelID(), (*cit)->getEpgID(), (*cit)->getName().c_str()); + + std::string tvg_id = (*cit)->getScriptName(); + if (tvg_id.empty()) + continue; + + tvg_id = tvg_id.substr(1,tvg_id.find_first_of("=")-1); + fprintf(outfile,"\t%s --%s\n",(*cit)->getChannelID(), tvg_id.c_str(), (*cit)->getName().c_str()); + } + fprintf(outfile, "\n"); + fclose(outfile); +} + std::string CBouquetManager::ReadMarkerValue(std::string strLine, const char* strMarkerName) { if (strLine.find(strMarkerName) != std::string::npos)