mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
allow epg mapping for all channels, add logic check for converter
Origin commit data
------------------
Commit: 2c66e1682f
Author: TangoCash <eric@loxat.de>
Date: 2018-10-28 (Sun, 28 Oct 2018)
This commit is contained in:
@@ -405,10 +405,6 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
|||||||
xmlNodePtr channel_node;
|
xmlNodePtr channel_node;
|
||||||
|
|
||||||
if (search) {
|
if (search) {
|
||||||
if(!bUser){
|
|
||||||
readEPGMapping();
|
|
||||||
}
|
|
||||||
|
|
||||||
t_original_network_id original_network_id;
|
t_original_network_id original_network_id;
|
||||||
t_service_id service_id;
|
t_service_id service_id;
|
||||||
t_transport_stream_id transport_stream_id;
|
t_transport_stream_id transport_stream_id;
|
||||||
@@ -518,12 +514,6 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
|||||||
search = xmlNextNode(search);
|
search = xmlNextNode(search);
|
||||||
}
|
}
|
||||||
INFO("total: %d bouquets", (int)Bouquets.size());
|
INFO("total: %d bouquets", (int)Bouquets.size());
|
||||||
if(!bUser && !EpgIDMapping.empty()){
|
|
||||||
EpgIDMapping.clear();
|
|
||||||
}
|
|
||||||
if(!bUser && !EpgXMLMapping.empty()){
|
|
||||||
EpgXMLMapping.clear();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
xmlFreeDoc(parser);
|
xmlFreeDoc(parser);
|
||||||
}
|
}
|
||||||
@@ -532,6 +522,8 @@ void CBouquetManager::loadBouquets(bool ignoreBouquetFile)
|
|||||||
{
|
{
|
||||||
TIMER_START();
|
TIMER_START();
|
||||||
clearAll();
|
clearAll();
|
||||||
|
readEPGMapping();
|
||||||
|
|
||||||
if (ignoreBouquetFile == false) {
|
if (ignoreBouquetFile == false) {
|
||||||
parseBouquetsXml(BOUQUETS_XML, false);
|
parseBouquetsXml(BOUQUETS_XML, false);
|
||||||
sortBouquets();
|
sortBouquets();
|
||||||
@@ -543,6 +535,12 @@ void CBouquetManager::loadBouquets(bool ignoreBouquetFile)
|
|||||||
parseBouquetsXml(UBOUQUETS_XML, true);
|
parseBouquetsXml(UBOUQUETS_XML, true);
|
||||||
renumServices();
|
renumServices();
|
||||||
CServiceManager::getInstance()->SetCIFilter();
|
CServiceManager::getInstance()->SetCIFilter();
|
||||||
|
if(!EpgIDMapping.empty()){
|
||||||
|
EpgIDMapping.clear();
|
||||||
|
}
|
||||||
|
if(!EpgXMLMapping.empty()){
|
||||||
|
EpgXMLMapping.clear();
|
||||||
|
}
|
||||||
TIMER_STOP("[zapit] bouquet loading took");
|
TIMER_STOP("[zapit] bouquet loading took");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1058,6 +1056,16 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
}
|
}
|
||||||
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, url, desc.c_str(), chid, epg_script.c_str(), mode);
|
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, url, desc.c_str(), chid, epg_script.c_str(), mode);
|
||||||
CServiceManager::getInstance()->AddChannel(channel);
|
CServiceManager::getInstance()->AddChannel(channel);
|
||||||
|
//remapinng epg_id
|
||||||
|
t_channel_id new_epgid = reMapEpgID(chid);
|
||||||
|
if(new_epgid)
|
||||||
|
channel->setEPGid(new_epgid);
|
||||||
|
std::string new_epgxml = reMapEpgXML(chid);
|
||||||
|
if(!new_epgxml.empty()) {
|
||||||
|
char buf[100];
|
||||||
|
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||||
|
channel->setScriptName("#" + new_epgxml + "=" + buf);
|
||||||
|
}
|
||||||
desc = "m3u_loading_logos";
|
desc = "m3u_loading_logos";
|
||||||
if (!alogo.empty() && !g_PicViewer->GetLogoName(chid,title,desc))
|
if (!alogo.empty() && !g_PicViewer->GetLogoName(chid,title,desc))
|
||||||
{
|
{
|
||||||
@@ -1262,8 +1270,10 @@ std::string CBouquetManager::reMapEpgXML(t_channel_id channelid)
|
|||||||
{
|
{
|
||||||
if(!EpgXMLMapping.empty()){
|
if(!EpgXMLMapping.empty()){
|
||||||
std::map<t_channel_id, std::string>::iterator it = EpgXMLMapping.find(channelid);
|
std::map<t_channel_id, std::string>::iterator it = EpgXMLMapping.find(channelid);
|
||||||
if ( it != EpgXMLMapping.end() )
|
if ( it != EpgXMLMapping.end() ){
|
||||||
|
INFO("mapping: %012" PRIx64 " to %s", channelid, it->second.c_str());
|
||||||
return it->second;
|
return it->second;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -1328,13 +1338,15 @@ void CBouquetManager::convert_E2_EPGMapping(std::string mapfile_in, std::string
|
|||||||
while (epgmap) {
|
while (epgmap) {
|
||||||
const char *e2_channelid = xmlGetData(epgmap);
|
const char *e2_channelid = xmlGetData(epgmap);
|
||||||
const char *xmlepg = xmlGetAttribute(epgmap, "id");
|
const char *xmlepg = xmlGetAttribute(epgmap, "id");
|
||||||
u_int sid = 0,tsid = 0,onid = 0,sat = 0;
|
if (e2_channelid[0] != '\0') {
|
||||||
sscanf(e2_channelid,"1:0:1:%X:%X:%X:%X0000:0:0:0:", &sid, &tsid, &onid, &sat);
|
u_int sid = 0,tsid = 0,onid = 0,sat = 0;
|
||||||
t_channel_id short_channel_id = create_channel_id(sid,onid,tsid);
|
sscanf(e2_channelid,"1:0:1:%X:%X:%X:%X0000:0:0:0:", &sid, &tsid, &onid, &sat);
|
||||||
CZapitChannel * cc = CServiceManager::getInstance()->FindChannel48(short_channel_id);
|
t_channel_id short_channel_id = create_channel_id(sid,onid,tsid);
|
||||||
if (cc) {
|
CZapitChannel * cc = CServiceManager::getInstance()->FindChannel48(short_channel_id);
|
||||||
if(xmlepg){
|
if (cc) {
|
||||||
fprintf(outfile,"\t<filter channel_id=\"%012" PRIx64 "\" >%s</filter> --%s\n",cc->getChannelID(), xmlepg, cc->getName().c_str());
|
if(xmlepg){
|
||||||
|
fprintf(outfile,"\t<filter channel_id=\"%012" PRIx64 "\" >%s</filter> --%s\n",cc->getChannelID(), xmlepg, cc->getName().c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
epgmap = xmlNextNode(epgmap);
|
epgmap = xmlNextNode(epgmap);
|
||||||
|
Reference in New Issue
Block a user