diff options
author | Christian Wieninger <cwieninger@gmx.de> | 2010-05-19 20:43:52 +0200 |
---|---|---|
committer | Christian Wieninger <cwieninger@gmx.de> | 2010-05-19 20:43:52 +0200 |
commit | f29ad0e7440db08287b4f703247417550fb7affa (patch) | |
tree | 8e76894ea31d689db7cd63e15d8cab45a497350a /epgsearchext.c | |
parent | e3c5fb72ac51366a6dd810b829e2f0abcc54bfe7 (diff) | |
download | vdr-plugin-epgsearch-f29ad0e7440db08287b4f703247417550fb7affa.tar.gz vdr-plugin-epgsearch-f29ad0e7440db08287b4f703247417550fb7affa.tar.bz2 |
small speed improvement
Diffstat (limited to 'epgsearchext.c')
-rw-r--r-- | epgsearchext.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/epgsearchext.c b/epgsearchext.c index 0df32ab..26ff95a 100644 --- a/epgsearchext.c +++ b/epgsearchext.c @@ -877,12 +877,6 @@ cEvent * cSearchExt::GetEventBySearchExt(const cSchedule *schedules, const cEven break; } - if (szTest) - { - free(szTest); - szTest = NULL; - } - if (skipRunningEvents && tNow > p->StartTime()) continue; @@ -890,15 +884,8 @@ cEvent * cSearchExt::GetEventBySearchExt(const cSchedule *schedules, const cEven if (!p->Title() || !*p->Title()) continue; - msprintf(&szTest, "%s%s%s%s%s", (useTitle?(p->Title()?p->Title():""):""), (useSubtitle||useDescription)?"~":"", - (useSubtitle?(p->ShortText()?p->ShortText():""):""),useDescription?"~":"", - (useDescription?(p->Description()?p->Description():""):"")); - if (tNow < p->EndTime() + (inspectTimerMargin?(MarginStop * 60):0)) { - if (!useCase) - ToLower(szTest); - if (useTime) { time_t tEvent = p->StartTime(); @@ -964,11 +951,21 @@ cEvent * cSearchExt::GetEventBySearchExt(const cSchedule *schedules, const cEven } } - if (*szTest) + msprintf(&szTest, "%s%s%s%s%s", (useTitle?(p->Title()?p->Title():""):""), (useSubtitle||useDescription)?"~":"", + (useSubtitle?(p->ShortText()?p->ShortText():""):""),useDescription?"~":"", + (useDescription?(p->Description()?p->Description():""):"")); + + if (!useCase) + ToLower(szTest); + + if (szTest && *szTest) { if (!MatchesSearchMode(szTest, searchText, mode," ,;|~", fuzzyTolerance)) continue; } + if (szTest) + free(szTest); + szTest = NULL; if (useExtEPGInfo && !MatchesExtEPGInfo(p)) continue; @@ -976,8 +973,6 @@ cEvent * cSearchExt::GetEventBySearchExt(const cSchedule *schedules, const cEven break; } } - if (szTest) - free(szTest); free(searchText); return pe; } |