summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-06-04 10:19:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-06-04 10:19:23 +0200
commit8d8dd8ecbd3a7c95800921009c72123939e3e571 (patch)
treeaec79840530906ce826751ededb9b8aed69c06dd /eit.c
parent4bce65eb10999e2c7500faa6113bb79af600dc2e (diff)
downloadvdr-8d8dd8ecbd3a7c95800921009c72123939e3e571.tar.gz
vdr-8d8dd8ecbd3a7c95800921009c72123939e3e571.tar.bz2
Added HandledExternally() to the EPG handler interface
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/eit.c b/eit.c
index c746337b..9840d9a2 100644
--- a/eit.c
+++ b/eit.c
@@ -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 2.18 2012/06/04 09:48:57 kls Exp $
+ * $Id: eit.c 2.19 2012/06/04 10:10:11 kls Exp $
*/
#include "eit.h"
@@ -45,6 +45,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
return;
}
+ bool handledExternally = EpgHandlers.HandledExternally(channel);
cSchedule *pSchedule = (cSchedule *)Schedules->GetSchedule(channel, true);
bool Empty = true;
@@ -70,7 +71,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
cEvent *newEvent = NULL;
cEvent *rEvent = NULL;
cEvent *pEvent = (cEvent *)pSchedule->GetEvent(SiEitEvent.getEventId(), StartTime);
- if (!pEvent) {
+ if (!pEvent || handledExternally) {
if (OnlyRunningStatus)
continue;
// If we don't have that event yet, we create a new one.
@@ -78,7 +79,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
pEvent = newEvent = new cEvent(SiEitEvent.getEventId());
newEvent->SetStartTime(StartTime);
newEvent->SetDuration(Duration);
- pSchedule->AddEvent(newEvent);
+ if (!handledExternally)
+ pSchedule->AddEvent(newEvent);
}
else {
// We have found an existing event, either through its event ID or its start time.
@@ -290,6 +292,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
channel->SetLinkChannels(LinkChannels);
Modified = true;
EpgHandlers.HandleEvent(pEvent);
+ if (handledExternally)
+ delete pEvent;
}
if (Tid == 0x4E) {
if (Empty && getSectionNumber() == 0)