summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-02-29 14:21:22 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-02-29 14:21:22 +0100
commit198fcf437b46d32beea411313f1dbd4aa200a62b (patch)
tree7dda9e4e3bb1b7ed3358db5ccf53a8f9ac5bde08 /epg.c
parent4063d727606382e22ce1e0a41d0fab17e88e9f06 (diff)
downloadvdr-198fcf437b46d32beea411313f1dbd4aa200a62b.tar.gz
vdr-198fcf437b46d32beea411313f1dbd4aa200a62b.tar.bz2
Implemented VPS controlled timers1.3.5
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/epg.c b/epg.c
index ce839751..be378c09 100644
--- a/epg.c
+++ b/epg.c
@@ -7,11 +7,12 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.13 2004/02/22 14:41:37 kls Exp $
+ * $Id: epg.c 1.14 2004/02/29 13:48:34 kls Exp $
*/
#include "epg.h"
#include "libsi/si.h"
+#include "timers.h"
#include <ctype.h>
#include <time.h>
@@ -95,6 +96,15 @@ void cEvent::SetVps(time_t Vps)
vps = Vps;
}
+bool cEvent::HasTimer(void) const
+{
+ for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
+ if (t->Event() == this)
+ return true;
+ }
+ return false;
+}
+
const char *cEvent::GetDateString(void) const
{
static char buf[25];
@@ -545,7 +555,7 @@ void cSchedule::Cleanup(time_t Time)
Event = events.Get(a);
if (!Event)
break;
- if (Event->StartTime() + Event->Duration() + Setup.EPGLinger * 60 + 3600 < Time) { // adding one hour for safety
+ if (!Event->HasTimer() && Event->StartTime() + Event->Duration() + Setup.EPGLinger * 60 + 3600 < Time) { // adding one hour for safety
events.Del(Event);
a--;
}