diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index d7d973257..6e53d131c 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -362,7 +362,8 @@ epgviewer.genre Genre epgviewer.length Spieldauer (Min.) epgviewer.nodetailed Keine ausführlichen Informationen verfügbar epgviewer.notfound Keine Programminformationen (EPG) gefunden -eventfinder.genre Filter +eventfinder.fsk Altersfreigabe Filter +eventfinder.genre Genre Filter eventfinder.head EPG-Suche eventfinder.history Frühere Suchen eventfinder.keyword Suche nach Textpassage @@ -700,6 +701,14 @@ fontsize.menu_hint Menü-Hilfe fontsize.menu_info Menüinfo fontsize.menu_title Menütitel fontsize.subtitles Text Untertitel +fsk.all aus +fsk.from_7 ab 7 +fsk.from_12 ab 12 +fsk.from_16 ab 16 +fsk.from_18 ab 18 +fsk.to_7 bis 7 +fsk.to_12 bis 12 +fsk.to_16 bis 16 hdd_10min 10 min. hdd_1min 1 min. hdd_20min 20 min. diff --git a/data/locale/english.locale b/data/locale/english.locale index cd6588f08..445193d55 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -363,7 +363,8 @@ epgviewer.genre Genre epgviewer.length Length (min.) epgviewer.nodetailed No detailed informations available epgviewer.notfound No EPG found -eventfinder.genre Filter +eventfinder.fsk Age rating Filter +eventfinder.genre Genre-Filter eventfinder.head Search in EPG eventfinder.history Search history eventfinder.keyword Keyword @@ -701,6 +702,14 @@ fontsize.menu_hint Menu hints fontsize.menu_info Menu Info fontsize.menu_title Menu Title fontsize.subtitles Text subtitles +fsk.all off +fsk.from_7 from 7 +fsk.from_12 from 12 +fsk.from_16 from 16 +fsk.from_18 from 18 +fsk.to_7 to 7 +fsk.to_12 to 12 +fsk.to_16 to 16 hdd_10min 10 min. hdd_1min 1 min. hdd_20min 20 min. diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 5293a4312..b682be9fe 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -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, int genre) +void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search, std::string search_text,bool all_chann, int genre,int fsk) { dprintf("sendAllEvents for " PRINTF_CHANNEL_ID_TYPE "\n", serviceUniqueKey); if(!eList.empty() && search == 0)//skip on search mode @@ -2358,6 +2358,15 @@ void CEitManager::getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEve if(copy && ((*e)->classifications.content < (genre & 0xf0 ) || (*e)->classifications.content > genre)) copy=false; } + if(copy && fsk != 0) + { + if(fsk<0) + { + if( (*e)->getFSK() > abs(fsk)) + copy=false; + }else if( (*e)->getFSK() < fsk) + copy=false; + } } if(copy) { for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t) diff --git a/src/eitd/sectionsd.h b/src/eitd/sectionsd.h index b278ba1d8..8972aa4ab 100644 --- a/src/eitd/sectionsd.h +++ b/src/eitd/sectionsd.h @@ -56,7 +56,7 @@ class CEitManager : public OpenThreads::Thread, public OpenThreads::Mutex bool Stop(); void SetConfig(CSectionsdClient::epg_config &cfg) { config = cfg; }; - void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "", bool all_chann=false, int genre=0xFF); + void getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "", bool all_chann=false, int genre=0xFF,int fsk=0); void getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next ); bool getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); bool getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 5087370db..247ce1cd6 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -103,6 +103,7 @@ CEventList::CEventList() m_search_channel_id = 1; m_search_bouquet_id= 1; m_search_genre = 1; + m_search_fsk = 1; full_width = width = 0; height = 0; @@ -1044,7 +1045,8 @@ bool CEventList::findEvents(void) &m_search_list, &m_search_channel_id, &m_search_bouquet_id, - &m_search_genre + &m_search_genre, + &m_search_fsk ); hide(); menu.exec(NULL,""); @@ -1057,7 +1059,7 @@ bool CEventList::findEvents(void) evtlist.clear(); if(m_search_list == SEARCH_LIST_CHANNEL) { - CEitManager::getInstance()->getEventsServiceKey(m_search_channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre); + CEitManager::getInstance()->getEventsServiceKey(m_search_channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre,m_search_fsk); } else if(m_search_list == SEARCH_LIST_BOUQUET) { @@ -1065,7 +1067,7 @@ bool CEventList::findEvents(void) for(int channel = 0; channel < channel_nr; channel++) { channel_id = bouquetList->Bouquets[m_search_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); - CEitManager::getInstance()->getEventsServiceKey(channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre); + CEitManager::getInstance()->getEventsServiceKey(channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre,m_search_fsk); } } else if(m_search_list == SEARCH_LIST_ALL) @@ -1085,7 +1087,7 @@ bool CEventList::findEvents(void) for (it = v.begin(); it != v.end(); ++it){ ch_id_map[*it & 0xFFFFFFFFFFFFULL] = *it; } - CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true,m_search_genre);//all_chann + CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true,m_search_genre,m_search_fsk);//all_chann if(!evtlist.empty()){ std::map::iterator map_it; @@ -1200,7 +1202,18 @@ const CMenuOptionChooser::keyval GENRE_GROUP[GENRE_GROUP_COUNT] = { 0x97, LOCALE_GENRE_DOCUS_MAGAZINES }, { 0xA7, LOCALE_GENRE_TRAVEL_HOBBIES } }; - +const short FSK_COUNT = 8; +const CMenuOptionChooser::keyval FSK[FSK_COUNT] = +{ + { 0, LOCALE_FSK_ALL }, + { -7, LOCALE_FSK_TO_7 }, + { -12, LOCALE_FSK_TO_12 }, + { -16, LOCALE_FSK_TO_16 }, + { 7, LOCALE_FSK_FROM_7 }, + { 12, LOCALE_FSK_FROM_12 }, + { 16, LOCALE_FSK_FROM_16 }, + { 18, LOCALE_FSK_FROM_18 } +}; #define SEARCH_LIST_OPTION_COUNT 3 const CMenuOptionChooser::keyval SEARCH_LIST_OPTIONS[SEARCH_LIST_OPTION_COUNT] = { @@ -1231,7 +1244,8 @@ CEventFinderMenu::CEventFinderMenu( int* event, int* search_list, t_channel_id* search_channel_id, t_bouquet_id* search_bouquet_id, - int* search_genre + int* search_genre, + int* search_fsk ) /************************************************************************************************/ { @@ -1242,6 +1256,7 @@ CEventFinderMenu::CEventFinderMenu( int* event, m_search_channel_id = search_channel_id; m_search_bouquet_id = search_bouquet_id; m_search_genre = search_genre; + m_search_fsk = search_fsk; width = 40; selected = -1; } @@ -1376,6 +1391,7 @@ int CEventFinderMenu::showMenu(void) CMenuForwarder* mf1 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "#1", CRCInput::RC_green); CMenuOptionChooser* mgenre = new CMenuOptionChooser(LOCALE_EVENTFINDER_GENRE, m_search_genre, GENRE_GROUP, GENRE_GROUP_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); + CMenuOptionChooser* mfsk = new CMenuOptionChooser(LOCALE_EVENTFINDER_FSK, m_search_fsk, FSK, FSK_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++)); CMenuWidget searchMenu(LOCALE_EVENTFINDER_HEAD, NEUTRINO_ICON_FEATURES, 40); @@ -1393,6 +1409,7 @@ int CEventFinderMenu::showMenu(void) searchMenu.addItem(mo1); searchMenu.addItem(GenericMenuSeparatorLine); searchMenu.addItem(mgenre); + searchMenu.addItem(mfsk); searchMenu.addItem(GenericMenuSeparatorLine); searchMenu.addItem(mf2); searchMenu.addItem(moc1); diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 4a4aff473..9bda01658 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -70,6 +70,7 @@ class CEventList std::string m_search_autokeyword; int m_search_list; int m_search_genre; + int m_search_fsk; t_channel_id m_search_channel_id; t_bouquet_id m_search_bouquet_id; bool m_showChannel; @@ -144,6 +145,7 @@ class CEventFinderMenu : public CMenuTarget, CChangeObserver int* m_event; int* m_search_epg_item; int* m_search_genre; + int* m_search_fsk; std::string* m_search_keyword; int* m_search_list; std::string m_search_channelname; @@ -159,7 +161,8 @@ class CEventFinderMenu : public CMenuTarget, CChangeObserver int* search_list, t_channel_id* search_channel_id, t_bouquet_id* search_bouquet_id, - int* search_genre + int* search_genre, + int* search_fsk ); int exec( CMenuTarget* parent, const std::string &actionkey); bool changeNotify(const neutrino_locale_t OptionName, void *); diff --git a/src/system/locals.h b/src/system/locals.h index c6615a96d..8b449e209 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -390,6 +390,7 @@ typedef enum LOCALE_EPGVIEWER_LENGTH, LOCALE_EPGVIEWER_NODETAILED, LOCALE_EPGVIEWER_NOTFOUND, + LOCALE_EVENTFINDER_FSK, LOCALE_EVENTFINDER_GENRE, LOCALE_EVENTFINDER_HEAD, LOCALE_EVENTFINDER_HISTORY, @@ -728,6 +729,14 @@ typedef enum LOCALE_FONTSIZE_MENU_INFO, LOCALE_FONTSIZE_MENU_TITLE, LOCALE_FONTSIZE_SUBTITLES, + LOCALE_FSK_ALL, + LOCALE_FSK_FROM_7, + LOCALE_FSK_FROM_12, + LOCALE_FSK_FROM_16, + LOCALE_FSK_FROM_18, + LOCALE_FSK_TO_7, + LOCALE_FSK_TO_12, + LOCALE_FSK_TO_16, LOCALE_HDD_10MIN, LOCALE_HDD_1MIN, LOCALE_HDD_20MIN, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 8f2ad2d47..9da6b170b 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -390,6 +390,7 @@ const char * locale_real_names[] = "epgviewer.length", "epgviewer.nodetailed", "epgviewer.notfound", + "eventfinder.fsk", "eventfinder.genre", "eventfinder.head", "eventfinder.history", @@ -728,6 +729,14 @@ const char * locale_real_names[] = "fontsize.menu_info", "fontsize.menu_title", "fontsize.subtitles", + "fsk.all", + "fsk.from_7", + "fsk.from_12", + "fsk.from_16", + "fsk.from_18", + "fsk.to_7", + "fsk.to_12", + "fsk.to_16", "hdd_10min", "hdd_1min", "hdd_20min",