diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-06-16 13:45:47 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-06-16 13:45:47 +0200 |
commit | 82e404a74e7f470998771267e36292fd2651d59d (patch) | |
tree | 12a108173b83e3156ec0b466307b9bad86ba9dd7 | |
parent | 872a0618f8b45d1e8e24f33b4a22add19b64ca4b (diff) | |
download | vdr-plugin-tvguide-82e404a74e7f470998771267e36292fd2651d59d.tar.gz vdr-plugin-tvguide-82e404a74e7f470998771267e36292fd2651d59d.tar.bz2 |
Add cRecManager::GetSearchExtCats and cRecManager::GetBlacklists
-rw-r--r-- | recmanager.c | 36 | ||||
-rw-r--r-- | 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<cTVGuideSearchTimer> *searchTimer) std::sort(searchTimer->begin(), searchTimer->end()); } +void cRecManager::GetSearchExtCats(std::vector<std::string> *searchExtCats) { + if (!epgSearchAvailable) { + return; + } + Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1; + if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { + std::list<std::string> list; + list = epgSearch->handler->ExtEPGInfoList(); + + for (std::list<std::string>::iterator it = list.begin(); it != list.end(); it++) { + searchExtCats->push_back(*it); + } + } +} + void cRecManager::GetChannelGroups(std::vector<std::string> *channelGroups) { if (!epgSearchAvailable) { return; } Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1; if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { - std::list<std::string> channelGroupList; - channelGroupList = epgSearch->handler->ChanGrpList(); + std::list<std::string> list; + list = epgSearch->handler->ChanGrpList(); - for (std::list<std::string>::iterator it = channelGroupList.begin(); it != channelGroupList.end(); it++) { + for (std::list<std::string>::iterator it = list.begin(); it != list.end(); it++) { channelGroups->push_back(*it); } } std::sort(channelGroups->begin(), channelGroups->end()); } +void cRecManager::GetBlacklists(std::vector<std::string> *blacklists) { + if (!epgSearchAvailable) { + return; + } + Epgsearch_services_v1_1 *epgSearch = new Epgsearch_services_v1_1; + if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) { + std::list<std::string> list; + list = epgSearch->handler->BlackList(); + + for (std::list<std::string>::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<TVGuideEPGSearchTemplate> *epgTemplates); void GetSearchTimers(std::vector<cTVGuideSearchTimer> *timers); + void GetSearchExtCats(std::vector<std::string> *searchExtCats); void GetChannelGroups(std::vector<std::string> *channelGroups); + void GetBlacklists(std::vector<std::string> *blacklists); int CreateSearchTimer(std::string epgSearchString); bool SaveSearchTimer(cTVGuideSearchTimer *searchTimer); void DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTimers); |