gui/miscsettings_menu.cpp: add option to cache EPG only for favorite channels,

filter not yet reconfigured after scan or editing favorite bouquets
This commit is contained in:
[CST] Focus
2015-01-22 18:52:42 +03:00
parent 486d3692a6
commit d98d94550f
9 changed files with 64 additions and 9 deletions

View File

@@ -43,6 +43,7 @@
extern CBouquetList * bouquetList;
extern CBouquetList * TVfavList;
extern CBouquetList * RADIOfavList;
extern CBouquetList * TVbouquetList;
CEpgScan::CEpgScan()
@@ -66,6 +67,33 @@ CEpgScan * CEpgScan::getInstance()
return inst;
}
void CEpgScan::ConfigureEIT()
{
CEitManager::getInstance()->clearChannelFilters();
if (g_settings.epg_save_mode == 0)
return;
int count = 0;
for (unsigned j = 0; j < TVfavList->Bouquets.size(); ++j) {
CChannelList * clist = TVfavList->Bouquets[j]->channelList;
for (unsigned i = 0; i < clist->Size(); i++) {
CZapitChannel * chan = clist->getChannelFromIndex(i);
CEitManager::getInstance()->addChannelFilter(chan->getOriginalNetworkId(), chan->getTransportStreamId(), chan->getServiceId());
count++;
}
}
for (unsigned j = 0; j < RADIOfavList->Bouquets.size(); ++j) {
CChannelList * clist = RADIOfavList->Bouquets[j]->channelList;
for (unsigned i = 0; i < clist->Size(); i++) {
CZapitChannel * chan = clist->getChannelFromIndex(i);
CEitManager::getInstance()->addChannelFilter(chan->getOriginalNetworkId(), chan->getTransportStreamId(), chan->getServiceId());
count++;
}
}
INFO("added %d channels to EIT white list\n", count);
}
void CEpgScan::Clear()
{
scanmap.clear();