mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +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++)
|
for (; !(cit.EndOfChannels()); cit++)
|
||||||
{
|
{
|
||||||
std::string tvg_id = (*cit)->getScriptName();
|
std::string tvg_id = (*cit)->getEPGmap();
|
||||||
|
|
||||||
if (tvg_id.empty())
|
if (tvg_id.empty())
|
||||||
continue;
|
continue;
|
||||||
|
@@ -127,6 +127,8 @@ class CZapitChannel
|
|||||||
std::string script;
|
std::string script;
|
||||||
/* TODO : Enable different unames in different bouquets ( generated bouquetID ? ) */
|
/* TODO : Enable different unames in different bouquets ( generated bouquetID ? ) */
|
||||||
std::string uname;
|
std::string uname;
|
||||||
|
/* EPG Name/ID mapping */
|
||||||
|
std::string epgmapper;
|
||||||
t_channel_id epg_id;
|
t_channel_id epg_id;
|
||||||
|
|
||||||
/* WebTV/WebRadio */
|
/* WebTV/WebRadio */
|
||||||
@@ -222,6 +224,8 @@ class CZapitChannel
|
|||||||
t_original_network_id getOriginalNetworkId(void) const { return original_network_id; }
|
t_original_network_id getOriginalNetworkId(void) const { return original_network_id; }
|
||||||
std::string getScriptName(void) const { return script; }
|
std::string getScriptName(void) const { return script; }
|
||||||
inline void setScriptName(const std::string &pscript) { script = pscript; }
|
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);
|
unsigned char getServiceType(bool real=false);
|
||||||
bool isUHD();
|
bool isUHD();
|
||||||
bool isHD();
|
bool isHD();
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
#define TVG_INFO_ID_MARKER "tvg-id="
|
#define TVG_INFO_ID_MARKER "tvg-id="
|
||||||
#define TVG_INFO_NAME_MARKER "tvg-name="
|
#define TVG_INFO_NAME_MARKER "tvg-name="
|
||||||
#define TVG_INFO_LOGO_MARKER "tvg-logo="
|
#define TVG_INFO_LOGO_MARKER "tvg-logo="
|
||||||
|
#define TVG_INFO_SCRIPT_MARKER "tvg-script="
|
||||||
#define TVG_INFO_SHIFT_MARKER "tvg-shift="
|
#define TVG_INFO_SHIFT_MARKER "tvg-shift="
|
||||||
#define GROUP_PREFIX_MARKER "group-prefix="
|
#define GROUP_PREFIX_MARKER "group-prefix="
|
||||||
#define GROUP_NAME_MARKER "group-title="
|
#define GROUP_NAME_MARKER "group-title="
|
||||||
@@ -961,7 +962,6 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
if ((epg_id == 0) && (script == NULL)) epg_id = chid;
|
if ((epg_id == 0) && (script == NULL)) epg_id = chid;
|
||||||
CZapitChannel * channel = new CZapitChannel(title, chid, url, desc, epg_id, script, mode);
|
CZapitChannel * channel = new CZapitChannel(title, chid, url, desc, epg_id, script, mode);
|
||||||
CServiceManager::getInstance()->AddChannel(channel);
|
CServiceManager::getInstance()->AddChannel(channel);
|
||||||
channel->flags = CZapitChannel::UPDATED;
|
|
||||||
//remapping epg_id
|
//remapping epg_id
|
||||||
t_channel_id new_epgid = reMapEpgID(chid);
|
t_channel_id new_epgid = reMapEpgID(chid);
|
||||||
if(new_epgid)
|
if(new_epgid)
|
||||||
@@ -970,9 +970,10 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
if(!new_epgxml.empty()) {
|
if(!new_epgxml.empty()) {
|
||||||
char buf[100];
|
char buf[100];
|
||||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||||
channel->setScriptName("#" + new_epgxml + "=" + buf);
|
channel->setEPGmap("#" + new_epgxml + "=" + buf);
|
||||||
channel->setEPGid(chid);
|
channel->setEPGid(chid);
|
||||||
}
|
}
|
||||||
|
channel->flags = CZapitChannel::UPDATED;
|
||||||
if (gbouquet)
|
if (gbouquet)
|
||||||
gbouquet->addService(channel);
|
gbouquet->addService(channel);
|
||||||
}
|
}
|
||||||
@@ -992,6 +993,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
std::string group = "";
|
std::string group = "";
|
||||||
std::string epgid = "";
|
std::string epgid = "";
|
||||||
std::string alogo = "";
|
std::string alogo = "";
|
||||||
|
std::string script = "";
|
||||||
CZapitBouquet* pbouquet = NULL;
|
CZapitBouquet* pbouquet = NULL;
|
||||||
|
|
||||||
infile.open(tmp_name.c_str(), std::ifstream::in);
|
infile.open(tmp_name.c_str(), std::ifstream::in);
|
||||||
@@ -1019,6 +1021,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
group = "";
|
group = "";
|
||||||
desc = "";
|
desc = "";
|
||||||
alogo = "";
|
alogo = "";
|
||||||
|
script = "";
|
||||||
|
|
||||||
if (iColon >= 0 && iComma >= 0 && iComma > iColon)
|
if (iColon >= 0 && iComma >= 0 && iComma > iColon)
|
||||||
{
|
{
|
||||||
@@ -1031,6 +1034,7 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
group = ReadMarkerValue(strInfoLine, GROUP_NAME_MARKER);
|
group = ReadMarkerValue(strInfoLine, GROUP_NAME_MARKER);
|
||||||
epgid = ReadMarkerValue(strInfoLine, TVG_INFO_ID_MARKER);
|
epgid = ReadMarkerValue(strInfoLine, TVG_INFO_ID_MARKER);
|
||||||
alogo = ReadMarkerValue(strInfoLine, TVG_INFO_LOGO_MARKER);
|
alogo = ReadMarkerValue(strInfoLine, TVG_INFO_LOGO_MARKER);
|
||||||
|
script = ReadMarkerValue(strInfoLine, TVG_INFO_SCRIPT_MARKER);
|
||||||
}
|
}
|
||||||
|
|
||||||
pbouquet = addBouquetIfNotExist((mode == MODE_WEBTV) ? "WebTV" : "WebRadio");
|
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);
|
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()) {
|
if (!epgid.empty()) {
|
||||||
char buf[100];
|
char buf[100];
|
||||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||||
// keep the tvg-id for later epg injection
|
// 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
|
//remapping epg_id
|
||||||
t_channel_id new_epgid = reMapEpgID(chid);
|
t_channel_id new_epgid = reMapEpgID(chid);
|
||||||
if(new_epgid)
|
if(new_epgid)
|
||||||
@@ -1082,7 +1085,8 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
if(!new_epgxml.empty()) {
|
if(!new_epgxml.empty()) {
|
||||||
char buf[100];
|
char buf[100];
|
||||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
||||||
channel->setScriptName("#" + new_epgxml + "=" + buf);
|
channel->setEPGmap("#" + new_epgxml + "=" + buf);
|
||||||
|
channel->setEPGid(chid);
|
||||||
}
|
}
|
||||||
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))
|
||||||
@@ -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());
|
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);
|
CZapitChannel * channel = new CZapitChannel(title.c_str(), chid, ::decodeUrl(url).c_str(), desc.c_str(), chid, NULL, mode);
|
||||||
CServiceManager::getInstance()->AddChannel(channel);
|
CServiceManager::getInstance()->AddChannel(channel);
|
||||||
channel->flags = CZapitChannel::UPDATED;
|
|
||||||
//remapping epg_id
|
//remapping epg_id
|
||||||
t_channel_id new_epgid = reMapEpgID(chid);
|
t_channel_id new_epgid = reMapEpgID(chid);
|
||||||
if(new_epgid)
|
if(new_epgid)
|
||||||
@@ -1191,8 +1194,10 @@ void CBouquetManager::loadWebchannels(int mode)
|
|||||||
if(!new_epgxml.empty()) {
|
if(!new_epgxml.empty()) {
|
||||||
char buf[100];
|
char buf[100];
|
||||||
snprintf(buf, sizeof(buf), "%llx", chid & 0xFFFFFFFFFFFFULL);
|
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)
|
if (gbouquet)
|
||||||
gbouquet->addService(channel);
|
gbouquet->addService(channel);
|
||||||
}
|
}
|
||||||
@@ -1433,7 +1438,7 @@ void CBouquetManager::dump_EPGMapping(std::string mapfile_out)
|
|||||||
if ((*cit)->getChannelID() != (*cit)->getEpgID())
|
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());
|
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())
|
if (tvg_id.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@@ -113,6 +113,7 @@ void CZapitChannel::Init()
|
|||||||
bLocked = DEFAULT_CH_LOCKED;
|
bLocked = DEFAULT_CH_LOCKED;
|
||||||
bUseCI = false;
|
bUseCI = false;
|
||||||
altlogo = "";
|
altlogo = "";
|
||||||
|
epgmapper = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
CZapitChannel::~CZapitChannel(void)
|
CZapitChannel::~CZapitChannel(void)
|
||||||
|
Reference in New Issue
Block a user