summaryrefslogtreecommitdiff
path: root/epgsearchext.c
diff options
context:
space:
mode:
Diffstat (limited to 'epgsearchext.c')
-rw-r--r--epgsearchext.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/epgsearchext.c b/epgsearchext.c
index a73a31b..08762c0 100644
--- a/epgsearchext.c
+++ b/epgsearchext.c
@@ -96,6 +96,7 @@ cSearchExt::cSearchExt(void)
compareSubtitle = 1;
compareSummary = 1;
compareSummaryMatchInPercent = 90;
+ compareDate = 0;
allowedRepeats = 0;
catvaluesAvoidRepeat = 0;
repeatsWithinDays = 0;
@@ -116,7 +117,6 @@ cSearchExt::cSearchExt(void)
ignoreMissingEPGCats = 0;
unmuteSoundOnSwitch = 0;
skipRunningEvents = false;
- *compareExpression = 0;
}
cSearchExt::~cSearchExt(void)
@@ -219,7 +219,7 @@ cSearchExt& cSearchExt::operator= (const cSearchExt &SearchExt)
compareSubtitle = templ->compareSubtitle;
compareSummary = templ->compareSummary;
compareSummaryMatchInPercent = templ->compareSummaryMatchInPercent;
- strcpy(compareExpression, templ->compareExpression);
+ compareDate = templ->compareDate;
allowedRepeats = templ->allowedRepeats;
catvaluesAvoidRepeat = templ->catvaluesAvoidRepeat;
repeatsWithinDays = templ->repeatsWithinDays;
@@ -274,7 +274,6 @@ const char *cSearchExt::ToText()
char* tmp_search = replaceSpecialChars(search);
char* tmp_directory = replaceSpecialChars(directory);
char* tmp_contentsFilter = replaceSpecialChars(contentsFilter.c_str());
- char* tmp_compareExpression = replaceSpecialChars(compareExpression);
if (useTime)
{
@@ -352,7 +351,7 @@ const char *cSearchExt::ToText()
}
}
- msprintf(&buffer, "%d:%s:%d:%s:%s:%d:%s:%d:%d:%d:%d:%d:%d:%s:%s:%d:%d:%d:%d:%s:%d:%d:%d:%d:%d:%d:%d:%s:%d:%d:%d:%d:%d:%ld:%d:%d:%d:%d:%d:%d:%s:%d:%d:%d:%d:%d:%d:%ld:%ld:%d:%d:%d:%s:%s",
+ msprintf(&buffer, "%d:%s:%d:%s:%s:%d:%s:%d:%d:%d:%d:%d:%d:%s:%s:%d:%d:%d:%d:%s:%d:%d:%d:%d:%d:%d:%d:%s:%d:%d:%d:%d:%d:%ld:%d:%d:%d:%d:%d:%d:%s:%d:%d:%d:%d:%d:%d:%ld:%ld:%d:%d:%d:%s:%d",
ID,
tmp_search,
useTime,
@@ -406,14 +405,13 @@ const char *cSearchExt::ToText()
unmuteSoundOnSwitch,
compareSummaryMatchInPercent,
contentsFilter.c_str(),
- compareExpression);
+ compareDate);
if (tmp_search) free(tmp_search);
if (tmp_directory) free(tmp_directory);
if (tmp_catvalues) free(tmp_catvalues);
if (tmp_blacklists) free(tmp_blacklists);
if (tmp_contentsFilter) free(tmp_contentsFilter);
- if (tmp_compareExpression) free(tmp_compareExpression);
return buffer;
}
@@ -620,7 +618,7 @@ bool cSearchExt::Parse(const char *s)
contentsFilter = value;
break;
case 54:
- strcpy(compareExpression, value);
+ compareDate = atoi(value);
break;
default:
break;
@@ -634,15 +632,12 @@ bool cSearchExt::Parse(const char *s)
strreplace(directory, '|', ':');
strreplace(search, '|', ':');
strreplace(contentsFilter, "|", ":");
- strreplace(compareExpression, '|', ':');
while(strstr(search, "!^pipe^!"))
strreplace(search, "!^pipe^!", "|");
while(strstr(directory, "!^pipe^!"))
strreplace(directory, "!^pipe^!", "|");
strreplace(contentsFilter, "!^pipe^!", "|");
- while(strstr(compareExpression, "!^pipe^!"))
- strreplace(compareExpression, "!^pipe^!", "|");
if (disableSearchtimer && useAsSearchTimer)
{
@@ -1205,7 +1200,7 @@ void cSearchExt::CheckRepeatTimers(cSearchResults* pResults)
if (!pResultObjP->needsTimer) continue;
- if (EventsMatch(pEvent, pEventP, compareTitle, compareSubtitle, compareSummary, compareExpression, catvaluesAvoidRepeat))
+ if (EventsMatch(pEvent, pEventP, compareTitle, compareSubtitle, compareSummary, compareDate, catvaluesAvoidRepeat))
{
if (!pFirstResultMatching) pFirstResultMatching = pResultObjP;
plannedTimers++;