mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
src/gui/eventlist.cpp -add fsk filter to epg-search
This commit is contained in:
@@ -362,7 +362,8 @@ epgviewer.genre Genre
|
|||||||
epgviewer.length Spieldauer (Min.)
|
epgviewer.length Spieldauer (Min.)
|
||||||
epgviewer.nodetailed Keine ausführlichen Informationen verfügbar
|
epgviewer.nodetailed Keine ausführlichen Informationen verfügbar
|
||||||
epgviewer.notfound Keine Programminformationen (EPG) gefunden
|
epgviewer.notfound Keine Programminformationen (EPG) gefunden
|
||||||
eventfinder.genre Filter
|
eventfinder.fsk Altersfreigabe Filter
|
||||||
|
eventfinder.genre Genre Filter
|
||||||
eventfinder.head EPG-Suche
|
eventfinder.head EPG-Suche
|
||||||
eventfinder.history Frühere Suchen
|
eventfinder.history Frühere Suchen
|
||||||
eventfinder.keyword Suche nach Textpassage
|
eventfinder.keyword Suche nach Textpassage
|
||||||
@@ -700,6 +701,14 @@ fontsize.menu_hint Menü-Hilfe
|
|||||||
fontsize.menu_info Menüinfo
|
fontsize.menu_info Menüinfo
|
||||||
fontsize.menu_title Menütitel
|
fontsize.menu_title Menütitel
|
||||||
fontsize.subtitles Text Untertitel
|
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_10min 10 min.
|
||||||
hdd_1min 1 min.
|
hdd_1min 1 min.
|
||||||
hdd_20min 20 min.
|
hdd_20min 20 min.
|
||||||
|
@@ -363,7 +363,8 @@ epgviewer.genre Genre
|
|||||||
epgviewer.length Length (min.)
|
epgviewer.length Length (min.)
|
||||||
epgviewer.nodetailed No detailed informations available
|
epgviewer.nodetailed No detailed informations available
|
||||||
epgviewer.notfound No EPG found
|
epgviewer.notfound No EPG found
|
||||||
eventfinder.genre Filter
|
eventfinder.fsk Age rating Filter
|
||||||
|
eventfinder.genre Genre-Filter
|
||||||
eventfinder.head Search in EPG
|
eventfinder.head Search in EPG
|
||||||
eventfinder.history Search history
|
eventfinder.history Search history
|
||||||
eventfinder.keyword Keyword
|
eventfinder.keyword Keyword
|
||||||
@@ -701,6 +702,14 @@ fontsize.menu_hint Menu hints
|
|||||||
fontsize.menu_info Menu Info
|
fontsize.menu_info Menu Info
|
||||||
fontsize.menu_title Menu Title
|
fontsize.menu_title Menu Title
|
||||||
fontsize.subtitles Text subtitles
|
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_10min 10 min.
|
||||||
hdd_1min 1 min.
|
hdd_1min 1 min.
|
||||||
hdd_20min 20 min.
|
hdd_20min 20 min.
|
||||||
|
@@ -2310,7 +2310,7 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* was: commandAllEventsChannelID sendAllEvents */
|
/* 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);
|
dprintf("sendAllEvents for " PRINTF_CHANNEL_ID_TYPE "\n", serviceUniqueKey);
|
||||||
if(!eList.empty() && search == 0)//skip on search mode
|
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))
|
if(copy && ((*e)->classifications.content < (genre & 0xf0 ) || (*e)->classifications.content > genre))
|
||||||
copy=false;
|
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) {
|
if(copy) {
|
||||||
for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t)
|
for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t)
|
||||||
|
@@ -56,7 +56,7 @@ class CEitManager : public OpenThreads::Thread, public OpenThreads::Mutex
|
|||||||
bool Stop();
|
bool Stop();
|
||||||
void SetConfig(CSectionsdClient::epg_config &cfg) { config = cfg; };
|
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 );
|
void getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next );
|
||||||
bool getEPGidShort(event_id_t epgID, CShortEPGData * epgdata);
|
bool getEPGidShort(event_id_t epgID, CShortEPGData * epgdata);
|
||||||
bool getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata);
|
bool getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata);
|
||||||
|
@@ -103,6 +103,7 @@ CEventList::CEventList()
|
|||||||
m_search_channel_id = 1;
|
m_search_channel_id = 1;
|
||||||
m_search_bouquet_id= 1;
|
m_search_bouquet_id= 1;
|
||||||
m_search_genre = 1;
|
m_search_genre = 1;
|
||||||
|
m_search_fsk = 1;
|
||||||
full_width = width = 0;
|
full_width = width = 0;
|
||||||
height = 0;
|
height = 0;
|
||||||
|
|
||||||
@@ -1044,7 +1045,8 @@ bool CEventList::findEvents(void)
|
|||||||
&m_search_list,
|
&m_search_list,
|
||||||
&m_search_channel_id,
|
&m_search_channel_id,
|
||||||
&m_search_bouquet_id,
|
&m_search_bouquet_id,
|
||||||
&m_search_genre
|
&m_search_genre,
|
||||||
|
&m_search_fsk
|
||||||
);
|
);
|
||||||
hide();
|
hide();
|
||||||
menu.exec(NULL,"");
|
menu.exec(NULL,"");
|
||||||
@@ -1057,7 +1059,7 @@ bool CEventList::findEvents(void)
|
|||||||
evtlist.clear();
|
evtlist.clear();
|
||||||
if(m_search_list == SEARCH_LIST_CHANNEL)
|
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)
|
else if(m_search_list == SEARCH_LIST_BOUQUET)
|
||||||
{
|
{
|
||||||
@@ -1065,7 +1067,7 @@ bool CEventList::findEvents(void)
|
|||||||
for(int channel = 0; channel < channel_nr; channel++)
|
for(int channel = 0; channel < channel_nr; channel++)
|
||||||
{
|
{
|
||||||
channel_id = bouquetList->Bouquets[m_search_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID();
|
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)
|
else if(m_search_list == SEARCH_LIST_ALL)
|
||||||
@@ -1085,7 +1087,7 @@ bool CEventList::findEvents(void)
|
|||||||
for (it = v.begin(); it != v.end(); ++it){
|
for (it = v.begin(); it != v.end(); ++it){
|
||||||
ch_id_map[*it & 0xFFFFFFFFFFFFULL] = *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()){
|
if(!evtlist.empty()){
|
||||||
std::map<t_channel_id, t_channel_id>::iterator map_it;
|
std::map<t_channel_id, t_channel_id>::iterator map_it;
|
||||||
@@ -1200,7 +1202,18 @@ const CMenuOptionChooser::keyval GENRE_GROUP[GENRE_GROUP_COUNT] =
|
|||||||
{ 0x97, LOCALE_GENRE_DOCUS_MAGAZINES },
|
{ 0x97, LOCALE_GENRE_DOCUS_MAGAZINES },
|
||||||
{ 0xA7, LOCALE_GENRE_TRAVEL_HOBBIES }
|
{ 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
|
#define SEARCH_LIST_OPTION_COUNT 3
|
||||||
const CMenuOptionChooser::keyval SEARCH_LIST_OPTIONS[SEARCH_LIST_OPTION_COUNT] =
|
const CMenuOptionChooser::keyval SEARCH_LIST_OPTIONS[SEARCH_LIST_OPTION_COUNT] =
|
||||||
{
|
{
|
||||||
@@ -1231,7 +1244,8 @@ CEventFinderMenu::CEventFinderMenu( int* event,
|
|||||||
int* search_list,
|
int* search_list,
|
||||||
t_channel_id* search_channel_id,
|
t_channel_id* search_channel_id,
|
||||||
t_bouquet_id* search_bouquet_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_channel_id = search_channel_id;
|
||||||
m_search_bouquet_id = search_bouquet_id;
|
m_search_bouquet_id = search_bouquet_id;
|
||||||
m_search_genre = search_genre;
|
m_search_genre = search_genre;
|
||||||
|
m_search_fsk = search_fsk;
|
||||||
width = 40;
|
width = 40;
|
||||||
selected = -1;
|
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);
|
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* 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);
|
CMenuWidget searchMenu(LOCALE_EVENTFINDER_HEAD, NEUTRINO_ICON_FEATURES, 40);
|
||||||
|
|
||||||
@@ -1393,6 +1409,7 @@ int CEventFinderMenu::showMenu(void)
|
|||||||
searchMenu.addItem(mo1);
|
searchMenu.addItem(mo1);
|
||||||
searchMenu.addItem(GenericMenuSeparatorLine);
|
searchMenu.addItem(GenericMenuSeparatorLine);
|
||||||
searchMenu.addItem(mgenre);
|
searchMenu.addItem(mgenre);
|
||||||
|
searchMenu.addItem(mfsk);
|
||||||
searchMenu.addItem(GenericMenuSeparatorLine);
|
searchMenu.addItem(GenericMenuSeparatorLine);
|
||||||
searchMenu.addItem(mf2);
|
searchMenu.addItem(mf2);
|
||||||
searchMenu.addItem(moc1);
|
searchMenu.addItem(moc1);
|
||||||
|
@@ -70,6 +70,7 @@ class CEventList
|
|||||||
std::string m_search_autokeyword;
|
std::string m_search_autokeyword;
|
||||||
int m_search_list;
|
int m_search_list;
|
||||||
int m_search_genre;
|
int m_search_genre;
|
||||||
|
int m_search_fsk;
|
||||||
t_channel_id m_search_channel_id;
|
t_channel_id m_search_channel_id;
|
||||||
t_bouquet_id m_search_bouquet_id;
|
t_bouquet_id m_search_bouquet_id;
|
||||||
bool m_showChannel;
|
bool m_showChannel;
|
||||||
@@ -144,6 +145,7 @@ class CEventFinderMenu : public CMenuTarget, CChangeObserver
|
|||||||
int* m_event;
|
int* m_event;
|
||||||
int* m_search_epg_item;
|
int* m_search_epg_item;
|
||||||
int* m_search_genre;
|
int* m_search_genre;
|
||||||
|
int* m_search_fsk;
|
||||||
std::string* m_search_keyword;
|
std::string* m_search_keyword;
|
||||||
int* m_search_list;
|
int* m_search_list;
|
||||||
std::string m_search_channelname;
|
std::string m_search_channelname;
|
||||||
@@ -159,7 +161,8 @@ class CEventFinderMenu : public CMenuTarget, CChangeObserver
|
|||||||
int* search_list,
|
int* search_list,
|
||||||
t_channel_id* search_channel_id,
|
t_channel_id* search_channel_id,
|
||||||
t_bouquet_id* search_bouquet_id,
|
t_bouquet_id* search_bouquet_id,
|
||||||
int* search_genre
|
int* search_genre,
|
||||||
|
int* search_fsk
|
||||||
);
|
);
|
||||||
int exec( CMenuTarget* parent, const std::string &actionkey);
|
int exec( CMenuTarget* parent, const std::string &actionkey);
|
||||||
bool changeNotify(const neutrino_locale_t OptionName, void *);
|
bool changeNotify(const neutrino_locale_t OptionName, void *);
|
||||||
|
@@ -390,6 +390,7 @@ typedef enum
|
|||||||
LOCALE_EPGVIEWER_LENGTH,
|
LOCALE_EPGVIEWER_LENGTH,
|
||||||
LOCALE_EPGVIEWER_NODETAILED,
|
LOCALE_EPGVIEWER_NODETAILED,
|
||||||
LOCALE_EPGVIEWER_NOTFOUND,
|
LOCALE_EPGVIEWER_NOTFOUND,
|
||||||
|
LOCALE_EVENTFINDER_FSK,
|
||||||
LOCALE_EVENTFINDER_GENRE,
|
LOCALE_EVENTFINDER_GENRE,
|
||||||
LOCALE_EVENTFINDER_HEAD,
|
LOCALE_EVENTFINDER_HEAD,
|
||||||
LOCALE_EVENTFINDER_HISTORY,
|
LOCALE_EVENTFINDER_HISTORY,
|
||||||
@@ -728,6 +729,14 @@ typedef enum
|
|||||||
LOCALE_FONTSIZE_MENU_INFO,
|
LOCALE_FONTSIZE_MENU_INFO,
|
||||||
LOCALE_FONTSIZE_MENU_TITLE,
|
LOCALE_FONTSIZE_MENU_TITLE,
|
||||||
LOCALE_FONTSIZE_SUBTITLES,
|
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_10MIN,
|
||||||
LOCALE_HDD_1MIN,
|
LOCALE_HDD_1MIN,
|
||||||
LOCALE_HDD_20MIN,
|
LOCALE_HDD_20MIN,
|
||||||
|
@@ -390,6 +390,7 @@ const char * locale_real_names[] =
|
|||||||
"epgviewer.length",
|
"epgviewer.length",
|
||||||
"epgviewer.nodetailed",
|
"epgviewer.nodetailed",
|
||||||
"epgviewer.notfound",
|
"epgviewer.notfound",
|
||||||
|
"eventfinder.fsk",
|
||||||
"eventfinder.genre",
|
"eventfinder.genre",
|
||||||
"eventfinder.head",
|
"eventfinder.head",
|
||||||
"eventfinder.history",
|
"eventfinder.history",
|
||||||
@@ -728,6 +729,14 @@ const char * locale_real_names[] =
|
|||||||
"fontsize.menu_info",
|
"fontsize.menu_info",
|
||||||
"fontsize.menu_title",
|
"fontsize.menu_title",
|
||||||
"fontsize.subtitles",
|
"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_10min",
|
||||||
"hdd_1min",
|
"hdd_1min",
|
||||||
"hdd_20min",
|
"hdd_20min",
|
||||||
|
Reference in New Issue
Block a user