diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2009-10-16 19:40:22 +0200 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2009-10-16 19:40:22 +0200 |
commit | c3bad13778798f9e85cb5ede49a877bdc673e4ba (patch) | |
tree | a2785bf9e7d91fbba17473a95418f5fdd7356778 /searchtimer_thread.c | |
parent | 4cea6c405bcf56c67be7d1d680c4686a4411f3ae (diff) | |
download | vdr-plugin-epgsearch-c3bad13778798f9e85cb5ede49a877bdc673e4ba.tar.gz vdr-plugin-epgsearch-c3bad13778798f9e85cb5ede49a877bdc673e4ba.tar.bz2 |
ignore time changes in the EPG less than 60s
Diffstat (limited to 'searchtimer_thread.c')
-rw-r--r-- | searchtimer_thread.c | 10 |
1 files changed, 8 insertions, 2 deletions
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)); |