summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2009-10-16 19:40:22 +0200
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2009-10-16 19:40:22 +0200
commitc3bad13778798f9e85cb5ede49a877bdc673e4ba (patch)
treea2785bf9e7d91fbba17473a95418f5fdd7356778
parent4cea6c405bcf56c67be7d1d680c4686a4411f3ae (diff)
downloadvdr-plugin-epgsearch-c3bad13778798f9e85cb5ede49a877bdc673e4ba.tar.gz
vdr-plugin-epgsearch-c3bad13778798f9e85cb5ede49a877bdc673e4ba.tar.bz2
ignore time changes in the EPG less than 60s
-rw-r--r--HISTORY3
-rw-r--r--HISTORY.DE4
-rw-r--r--searchtimer_thread.c10
3 files changed, 15 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 6300127..c8d7620 100644
--- a/HISTORY
+++ b/HISTORY
@@ -106,6 +106,9 @@ fixes:
Tuononen for reporting
- make sure only one regular expression library is linked against epgsearch, thanks to
Ville Skyttä for providing a patch.
+- some providers have strange EPG time changes only by some seconds. epgsearch now ignores
+ changes less than 60s and does not touch the corresponding timer or report by mail,
+ thanks to cmichel@mantis for reporting
2008-04-29: Version 0.9.24
new:
diff --git a/HISTORY.DE b/HISTORY.DE
index abe0b19..3dc2c1a 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -111,6 +111,10 @@ fixes:
Danke an Lari Tuononen für den Hinweis.
- Sichergestellt, dass nur noch ein Library für reguläre Ausdrücke von epgsearch benutzt
wird, Danke an Ville Skyttä für den Patch.
+- Einige Provider haben seltsame Änderungen in den EPG-Zeiten von nur wenigen Sekunden.
+ epgsearch ignoriert nun Änderungen von weniger als 60s und ändert den zugehörigen Timer
+ nicht. Es erfolgt auch keine Emailbenachrichtigung. Danke an cmichel@mantis für den
+ Hinweis.
2008-04-29: Version 0.9.24
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index 46a2e35..a232553 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -158,8 +158,10 @@ cTimer *cSearchTimerThread::GetTimer(cSearchExt *searchExt, const cEvent *pEvent
if (tmStartEv->tm_mday != tmStartTi->tm_mday)
continue;
- bTimesMatchExactly = (tStart == eStart && tStop == eStop);
-
+ // some providers change EPG times only for a few seconds
+ // ignore this to avoid search timer mails because of such changes
+ bTimesMatchExactly = (abs(tStart -eStart) < 60 && abs(tStop - eStop) < 60);
+
if (abs(tStart - eStart) < AllowedDiff * 60 && abs(tStop - eStop) < AllowedDiff * 60) // accept a difference of max 10 min., but only if the event duration is more than 10 minutes
return ti;
}
@@ -599,6 +601,10 @@ char* cSearchTimerThread::SummaryExtended(cSearchExt* searchExt, cTimer* Timer,
eStop = pEvent->EndTime();
else
eStop = pEvent->Vps() + pEvent->Duration();
+ // make sure that eStart and eStop represent a full minute
+ eStart = (eStart / 60) * 60;
+ eStop = (eStop / 60) * 60;
+
time_t start = eStart - (UseVPS?0:(searchExt->MarginStart * 60));
time_t stop = eStop + (UseVPS?0:(searchExt->MarginStop * 60));