diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-12-26 14:44:28 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-12-26 14:44:28 +0100 |
commit | ad552300510a2b5c989d5eda181d58c11d355ee2 (patch) | |
tree | daf9b7e186eb99417efc0e2f18247e879a97f657 /eit.c | |
parent | f94046db2e2abc33434ab4f2f4203a4f1966660d (diff) | |
download | vdr-ad552300510a2b5c989d5eda181d58c11d355ee2.tar.gz vdr-ad552300510a2b5c989d5eda181d58c11d355ee2.tar.bz2 |
EPG events that are no longer in the currently broadcasted data stream are now automatically deleted
Diffstat (limited to 'eit.c')
-rw-r--r-- | eit.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -8,7 +8,7 @@ * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>. * - * $Id: eit.c 1.112 2005/11/04 14:19:16 kls Exp $ + * $Id: eit.c 1.113 2005/12/26 11:50:09 kls Exp $ */ #include "eit.h" @@ -43,6 +43,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) bool Empty = true; bool Modified = false; + time_t SegmentStart = 0; + time_t SegmentEnd = 0; SI::EIT::Event SiEitEvent; for (SI::Loop::Iterator it; eventLoop.getNext(SiEitEvent, it); ) { @@ -50,6 +52,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) if (SiEitEvent.getStartTime() == 0 || SiEitEvent.getStartTime() > 0 && SiEitEvent.getDuration() == 0) continue; Empty = false; + if (!SegmentStart) + SegmentStart = SiEitEvent.getStartTime(); + SegmentEnd = SiEitEvent.getStartTime() + SiEitEvent.getDuration(); cEvent *newEvent = NULL; cEvent *rEvent = NULL; cEvent *pEvent = (cEvent *)pSchedule->GetEvent(SiEitEvent.getEventId(), SiEitEvent.getStartTime()); @@ -242,6 +247,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) pSchedule->SetPresentSeen(); if (Modified) { pSchedule->Sort(); + pSchedule->DropOutdated(SegmentStart, SegmentEnd, Tid, getVersionNumber()); Schedules->SetModified(pSchedule); } } |