summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-07-23 18:50:33 +0200
committerlouis <louis.braun@gmx.de>2013-07-23 18:50:33 +0200
commit8578af36682c104c3ef99e1d7cdc77d3abaa5444 (patch)
tree6e7b592d7a05fd19162830d73f8b5ff002205f86
parentff51b1ffa48151b8d3d54b0f36ebbac848503c63 (diff)
downloadvdr-plugin-tvguide-8578af36682c104c3ef99e1d7cdc77d3abaa5444.tar.gz
vdr-plugin-tvguide-8578af36682c104c3ef99e1d7cdc77d3abaa5444.tar.bz2
Fixed a bug when epgsearch search string contains a colon
-rw-r--r--recmanager.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/recmanager.c b/recmanager.c
index 59eddcb..61ad426 100644
--- a/recmanager.c
+++ b/recmanager.c
@@ -386,14 +386,18 @@ std::vector<TVGuideEPGSearchTemplate> cRecManager::ReadEPGSearchTemplates(void)
}
std::string cRecManager::BuildEPGSearchString(cString searchString, std::string templValue) {
+ std::string strSearchString = *searchString;
+ std::replace(strSearchString.begin(), strSearchString.end(), ':', '|');
std::stringstream searchTimerString;
searchTimerString << "0:";
- searchTimerString << *searchString;
+ searchTimerString << strSearchString;
searchTimerString << templValue;
return searchTimerString.str();
}
std::string cRecManager::BuildEPGSearchString(cString searchString, cRecMenu *menu) {
+ std::string strSearchString = *searchString;
+ std::replace(strSearchString.begin(), strSearchString.end(), ':', '|');
int searchMode = menu->GetIntValue(0);
bool useTitle = menu->GetBoolValue(1);
bool useSubTitle = menu->GetBoolValue(2);
@@ -417,7 +421,7 @@ std::string cRecManager::BuildEPGSearchString(cString searchString, cRecMenu *me
//1 - unique search timer id
searchTimerString << "0:";
//2 - the search term
- searchTimerString << *searchString;
+ searchTimerString << strSearchString;
//3 - use time? 0/1
//4 - start time in HHMM
//5 - stop time in HHMM
@@ -538,7 +542,7 @@ std::string cRecManager::BuildEPGSearchString(cString searchString, cRecMenu *me
54 - compare date when testing for a repeat? (0=no, 1=same day, 2=same week, 3=same month) */
searchTimerString << "0::::0:::0::0:::::::::0";
- //esyslog("tvguide: epgsearch String: %s", searchTimerString.str().c_str());
+ esyslog("tvguide: epgsearch String: %s", searchTimerString.str().c_str());
return searchTimerString.str();
}
@@ -609,6 +613,8 @@ const cEvent **cRecManager::PerformSearch(cRecMenu *menu, bool withOptions, int
if (epgSearchPlugin->Service("Epgsearch-searchresults-v1.0", &data)) {
cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *list = data.pResultList;
+ if (!list)
+ return NULL;
int numElements = list->Count();
const cEvent **searchResults = NULL;
if (numElements > 0) {