mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
move xmltv epgmapping into own variable
Origin commit data
------------------
Branch: ni/coolstream
Commit: 19882ecd80
Author: TangoCash <eric@loxat.de>
Date: 2021-08-22 (Sun, 22 Aug 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -550,7 +550,7 @@ t_channel_id getepgid(std::string epg_name)
|
||||
|
||||
for (; !(cit.EndOfChannels()); cit++)
|
||||
{
|
||||
std::string tvg_id = (*cit)->getScriptName();
|
||||
std::string tvg_id = (*cit)->getEPGmap();
|
||||
|
||||
if (tvg_id.empty())
|
||||
continue;
|
||||
|
@@ -127,6 +127,8 @@ class CZapitChannel
|
||||
std::string script;
|
||||
/* TODO : Enable different unames in different bouquets ( generated bouquetID ? ) */
|
||||
std::string uname;
|
||||
/* EPG Name/ID mapping */
|
||||
std::string epgmapper;
|
||||
t_channel_id epg_id;
|
||||
|
||||
/* WebTV/WebRadio */
|
||||
@@ -222,6 +224,8 @@ class CZapitChannel
|
||||
t_original_network_id getOriginalNetworkId(void) const { return original_network_id; }
|
||||
std::string getScriptName(void) const { return script; }
|
||||
inline void setScriptName(const std::string &pscript) { script = pscript; }
|
||||
std::string getEPGmap(void) const { return epgmapper; }
|
||||
inline void setEPGmap(const std::string &pepgmapper) { epgmapper = pepgmapper; }
|
||||
unsigned char getServiceType(bool real=false);
|
||||
bool isUHD();
|
||||
bool isHD();
|
||||
|
@@ -52,6 +52,7 @@
|
||||
#define TVG_INFO_ID_MARKER "tvg-id="
|
||||
#define TVG_INFO_NAME_MARKER "tvg-name="
|
||||
#define TVG_INFO_LOGO_MARKER "tvg-logo="
|
||||
#define TVG_INFO_SCRIPT_MARKER "tvg-script="
|
||||
#define TVG_INFO_SHIFT_MARKER "tvg-shift="
|
||||
#define GROUP_PREFIX_MARKER "group-prefix="
|
||||
#define GROUP_NAME_MARKER "group-title="
|
||||
@@ -961,7 +962,6 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
if ((epg_id == 0) && (script == NULL)) epg_id = chid;
|
||||
CZapitChannel * channel = new CZapitChannel(title, chid, url, desc, epg_id, script, mode);
|
||||
CServiceManager::getInstance()->AddChannel(channel);
|
||||
channel->flags = CZapitChannel::UPDATED;
|
||||
//remapping epg_id
|
||||
t_channel_id new_epgid = reMapEpgID(chid);
|
||||
if(new_epgid)
|
||||
@@ -970,9 +970,10 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
if(!new_epgxml.empty()) {
|
||||
char buf[100];
|
||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||
channel->setScriptName("#" + new_epgxml + "=" + buf);
|
||||
channel->setEPGmap("#" + new_epgxml + "=" + buf);
|
||||
channel->setEPGid(chid);
|
||||
}
|
||||
channel->flags = CZapitChannel::UPDATED;
|
||||
if (gbouquet)
|
||||
gbouquet->addService(channel);
|
||||
}
|
||||
@@ -992,6 +993,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
std::string group = "";
|
||||
std::string epgid = "";
|
||||
std::string alogo = "";
|
||||
std::string script = "";
|
||||
CZapitBouquet* pbouquet = NULL;
|
||||
|
||||
infile.open(tmp_name.c_str(), std::ifstream::in);
|
||||
@@ -1019,6 +1021,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
group = "";
|
||||
desc = "";
|
||||
alogo = "";
|
||||
script = "";
|
||||
|
||||
if (iColon >= 0 && iComma >= 0 && iComma > iColon)
|
||||
{
|
||||
@@ -1031,6 +1034,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
group = ReadMarkerValue(strInfoLine, GROUP_NAME_MARKER);
|
||||
epgid = ReadMarkerValue(strInfoLine, TVG_INFO_ID_MARKER);
|
||||
alogo = ReadMarkerValue(strInfoLine, TVG_INFO_LOGO_MARKER);
|
||||
script = ReadMarkerValue(strInfoLine, TVG_INFO_SCRIPT_MARKER);
|
||||
}
|
||||
|
||||
pbouquet = addBouquetIfNotExist((mode == MODE_WEBTV) ? "WebTV" : "WebRadio");
|
||||
@@ -1065,15 +1069,14 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
}
|
||||
|
||||
t_channel_id chid = create_channel_id64(0, 0, 0, 0, 0, url);
|
||||
std::string epg_script = "";
|
||||
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, url, desc.c_str(), chid, script.c_str(), mode);
|
||||
CServiceManager::getInstance()->AddChannel(channel);
|
||||
if (!epgid.empty()) {
|
||||
char buf[100];
|
||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||
// keep the tvg-id for later epg injection
|
||||
epg_script = "#" + epgid + "=" + buf;
|
||||
channel->setEPGmap("#" + epgid + "=" + buf);
|
||||
}
|
||||
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, url, desc.c_str(), chid, epg_script.c_str(), mode);
|
||||
CServiceManager::getInstance()->AddChannel(channel);
|
||||
//remapping epg_id
|
||||
t_channel_id new_epgid = reMapEpgID(chid);
|
||||
if(new_epgid)
|
||||
@@ -1082,7 +1085,8 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
if(!new_epgxml.empty()) {
|
||||
char buf[100];
|
||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||
channel->setScriptName("#" + new_epgxml + "=" + buf);
|
||||
channel->setEPGmap("#" + new_epgxml + "=" + buf);
|
||||
channel->setEPGid(chid);
|
||||
}
|
||||
desc = "m3u_loading_logos";
|
||||
if (!alogo.empty() && !g_PicViewer->GetLogoName(chid,title,desc))
|
||||
@@ -1182,7 +1186,6 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
t_channel_id chid = create_channel_id64(0, 0, 0, 0, 0, ::decodeUrl(url).c_str());
|
||||
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, ::decodeUrl(url).c_str(), desc.c_str(), chid, NULL, mode);
|
||||
CServiceManager::getInstance()->AddChannel(channel);
|
||||
channel->flags = CZapitChannel::UPDATED;
|
||||
//remapping epg_id
|
||||
t_channel_id new_epgid = reMapEpgID(chid);
|
||||
if(new_epgid)
|
||||
@@ -1191,8 +1194,10 @@ void CBouquetManager::loadWebchannels(int mode)
|
||||
if(!new_epgxml.empty()) {
|
||||
char buf[100];
|
||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||
channel->setScriptName("#" + new_epgxml + "=" + buf);
|
||||
channel->setEPGmap("#" + new_epgxml + "=" + buf);
|
||||
channel->setEPGid(chid);
|
||||
}
|
||||
channel->flags = CZapitChannel::UPDATED;
|
||||
if (gbouquet)
|
||||
gbouquet->addService(channel);
|
||||
}
|
||||
@@ -1433,7 +1438,7 @@ void CBouquetManager::dump_EPGMapping(std::string mapfile_out)
|
||||
if ((*cit)->getChannelID() != (*cit)->getEpgID())
|
||||
fprintf(outfile,"\t<filter channel_id=\"%012" PRIx64 "\" new_epg_id=\"%012" PRIx64 "\" /> --%s\n",(*cit)->getChannelID(), (*cit)->getEpgID(), (*cit)->getName().c_str());
|
||||
|
||||
std::string tvg_id = (*cit)->getScriptName();
|
||||
std::string tvg_id = (*cit)->getEPGmap();
|
||||
if (tvg_id.empty())
|
||||
continue;
|
||||
|
||||
|
@@ -113,6 +113,7 @@ void CZapitChannel::Init()
|
||||
bLocked = DEFAULT_CH_LOCKED;
|
||||
bUseCI = false;
|
||||
altlogo = "";
|
||||
epgmapper = "";
|
||||
}
|
||||
|
||||
CZapitChannel::~CZapitChannel(void)
|
||||
|
Reference in New Issue
Block a user