CNeutrinoEventList::findEvents - search in unique channelList

This commit is contained in:
Jacek Jendrzej
2013-05-13 10:13:29 +02:00
parent c32266e8f4
commit 3ee3452fda

View File

@@ -1006,8 +1006,6 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*
return res; return res;
} }
/************************************************************************************************/ /************************************************************************************************/
bool CNeutrinoEventList::findEvents(void) bool CNeutrinoEventList::findEvents(void)
/************************************************************************************************/ /************************************************************************************************/
@@ -1057,15 +1055,23 @@ bool CNeutrinoEventList::findEvents(void)
CHintBox box(LOCALE_TIMING_EPG,g_Locale->getText(LOCALE_EVENTFINDER_SEARCHING)); CHintBox box(LOCALE_TIMING_EPG,g_Locale->getText(LOCALE_EVENTFINDER_SEARCHING));
box.paint(); box.paint();
int bouquet_nr = bouquetList->Bouquets.size(); int bouquet_nr = bouquetList->Bouquets.size();
std::vector<t_channel_id> v;
for(int bouquet = 0; bouquet < bouquet_nr; bouquet++) for(int bouquet = 0; bouquet < bouquet_nr; bouquet++)
{ {
int channel_nr = bouquetList->Bouquets[bouquet]->channelList->getSize(); int channel_nr = bouquetList->Bouquets[bouquet]->channelList->getSize();
for(int channel = 0; channel < channel_nr; channel++) for(int channel = 0; channel < channel_nr; channel++)
{ {
channel_id = bouquetList->Bouquets[bouquet]->channelList->getChannelFromIndex(channel)->channel_id; channel_id = bouquetList->Bouquets[bouquet]->channelList->getChannelFromIndex(channel)->channel_id;
CEitManager::getInstance()->getEventsServiceKey(channel_id,evtlist, m_search_epg_item,m_search_keyword); v.push_back(channel_id);
} }
} }
sort(v.begin(), v.end());
std::vector<t_channel_id>::iterator last_it = unique(v.begin(), v.end());
std::vector<t_channel_id>::iterator it;
for (it = v.begin(); it != last_it; ++it)
{
CEitManager::getInstance()->getEventsServiceKey(*it,evtlist, m_search_epg_item,m_search_keyword);
}
box.hide(); box.hide();
} }
if(!evtlist.empty()){ if(!evtlist.empty()){