mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
fix epg mapping for multiple channels
This commit is contained in:
@@ -538,7 +538,8 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count)
|
|||||||
|
|
||||||
t_channel_id getepgid(std::string epg_name)
|
t_channel_id getepgid(std::string epg_name)
|
||||||
{
|
{
|
||||||
t_channel_id epgid;
|
t_channel_id epgid = 0;
|
||||||
|
bool match_found = false;
|
||||||
|
|
||||||
CBouquetManager::ChannelIterator cit = g_bouquetManager->tvChannelsBegin();
|
CBouquetManager::ChannelIterator cit = g_bouquetManager->tvChannelsBegin();
|
||||||
|
|
||||||
@@ -557,16 +558,24 @@ t_channel_id getepgid(std::string epg_name)
|
|||||||
std::size_t found = tvg_id.find("#"+epg_name);
|
std::size_t found = tvg_id.find("#"+epg_name);
|
||||||
if (found != std::string::npos)
|
if (found != std::string::npos)
|
||||||
{
|
{
|
||||||
tvg_id = tvg_id.substr(tvg_id.find_first_of("="));
|
if (match_found)
|
||||||
sscanf(tvg_id.c_str(), "=%" SCNx64, &epgid);
|
{
|
||||||
return epgid;
|
if ((*cit)->getEpgID() == epgid) continue;
|
||||||
|
(*cit)->setEPGid(epgid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tvg_id = tvg_id.substr(tvg_id.find_first_of("="));
|
||||||
|
sscanf(tvg_id.c_str(), "=%" SCNx64, &epgid);
|
||||||
|
match_found = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return epgid;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int my_filter(const struct dirent *entry)
|
static int my_filter(const struct dirent *entry)
|
||||||
|
Reference in New Issue
Block a user