From 82e404a74e7f470998771267e36292fd2651d59d Mon Sep 17 00:00:00 2001 From: kamel5 Date: Sun, 16 Jun 2019 13:45:47 +0200 Subject: [PATCH] Add cRecManager::GetSearchExtCats and cRecManager::GetBlacklists --- recmanager.c | 36 +++++++++++++++++++++++++++++++++--- recmanager.h | 2 ++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/recmanager.c b/recmanager.c index 0a5fc75..24f897d 100644 --- a/recmanager.c +++ b/recmanager.c @@ -495,22 +495,52 @@ void cRecManager::GetSearchTimers(std::vector *searchTimer) std::sort(searchTimer->begin(), searchTimer->end()); } +void cRecManager::GetSearchExtCats(std::vector *searchExtCats) { + if (!epgSearchAvailable) { + return; + } + Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1; + if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { + std::list list; + list = epgSearch->handler->ExtEPGInfoList(); + + for (std::list::iterator it = list.begin(); it != list.end(); it++) { + searchExtCats->push_back(*it); + } + } +} + void cRecManager::GetChannelGroups(std::vector *channelGroups) { if (!epgSearchAvailable) { return; } Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1; if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { - std::list channelGroupList; - channelGroupList = epgSearch->handler->ChanGrpList(); + std::list list; + list = epgSearch->handler->ChanGrpList(); - for (std::list::iterator it = channelGroupList.begin(); it != channelGroupList.end(); it++) { + for (std::list::iterator it = list.begin(); it != list.end(); it++) { channelGroups->push_back(*it); } } std::sort(channelGroups->begin(), channelGroups->end()); } +void cRecManager::GetBlacklists(std::vector *blacklists) { + if (!epgSearchAvailable) { + return; + } + Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1; + if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { + std::list list; + list = epgSearch->handler->BlackList(); + + for (std::list::iterator it = list.begin(); it != list.end(); it++) { + blacklists->push_back(*it); + } + } +} + int cRecManager::CreateSearchTimer(std::string epgSearchString) { int timerID = -1; if (!epgSearchAvailable) diff --git a/recmanager.h b/recmanager.h index b29ef1c..c56a645 100644 --- a/recmanager.h +++ b/recmanager.h @@ -46,7 +46,9 @@ public: const cEvent **PerformSearch(Epgsearch_searchresults_v1_0 data, int &numResults); void ReadEPGSearchTemplates(std::vector *epgTemplates); void GetSearchTimers(std::vector *timers); + void GetSearchExtCats(std::vector *searchExtCats); void GetChannelGroups(std::vector *channelGroups); + void GetBlacklists(std::vector *blacklists); int CreateSearchTimer(std::string epgSearchString); bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer); void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers);