src/gui/eventlist.cpp-add program category filter to epg-search

This commit is contained in:
Jacek Jendrzej
2015-06-30 14:23:39 +02:00
parent e6e8eb9d93
commit 39796eda68
8 changed files with 92 additions and 9 deletions

View File

@@ -2310,7 +2310,7 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
}
/* was: commandAllEventsChannelID sendAllEvents */
void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text,bool all_chann)
void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text,bool all_chann, int genre)
{
dprintf("sendAllEvents for " PRINTF_CHANNEL_ID_TYPE "\n", serviceUniqueKey);
if(!eList.empty() && search == 0)//skip on search mode
@@ -2351,6 +2351,13 @@ void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEve
std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower);
copy = (eExtendedText.find(search_text) != std::string::npos);
}
if(copy && genre != 0xFF)
{
if((*e)->classifications.content==0)
copy=false;
if(copy && ((*e)->classifications.content < (genre & 0xf0 ) || (*e)->classifications.content > genre))
copy=false;
}
}
if(copy) {
for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t)