From 3ee3452fdaf3417c4be0274af07b930938cdf9ad Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 13 May 2013 10:13:29 +0200 Subject: [PATCH] CNeutrinoEventList::findEvents - search in unique channelList --- src/gui/eventlist.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 04348f36a..47d4d1c17 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1006,8 +1006,6 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey* return res; } - - /************************************************************************************************/ bool CNeutrinoEventList::findEvents(void) /************************************************************************************************/ @@ -1057,15 +1055,23 @@ bool CNeutrinoEventList::findEvents(void) CHintBox box(LOCALE_TIMING_EPG,g_Locale->getText(LOCALE_EVENTFINDER_SEARCHING)); box.paint(); int bouquet_nr = bouquetList->Bouquets.size(); + std::vector v; for(int bouquet = 0; bouquet < bouquet_nr; bouquet++) { int channel_nr = bouquetList->Bouquets[bouquet]->channelList->getSize(); for(int channel = 0; channel < channel_nr; channel++) { 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::iterator last_it = unique(v.begin(), v.end()); + std::vector::iterator it; + for (it = v.begin(); it != last_it; ++it) + { + CEitManager::getInstance()->getEventsServiceKey(*it,evtlist, m_search_epg_item,m_search_keyword); + } box.hide(); } if(!evtlist.empty()){