From c3bad13778798f9e85cb5ede49a877bdc673e4ba Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Fri, 16 Oct 2009 19:40:22 +0200 Subject: ignore time changes in the EPG less than 60s --- searchtimer_thread.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'searchtimer_thread.c') 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)); -- cgit v1.2.3