summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-03-25 11:43:05 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-03-25 11:43:05 +0100
commit3dd002cc2bc465cd10abef04e8b7d833105d48f2 (patch)
treedc8d64f5e87ab293dcd139114aa500bec687a92f /epg.c
parent51be693f627bbbb459f901f75348263356791e3c (diff)
downloadvdr-3dd002cc2bc465cd10abef04e8b7d833105d48f2.tar.gz
vdr-3dd002cc2bc465cd10abef04e8b7d833105d48f2.tar.bz2
Fixed getting the present EPG event in case none is currently 'running'
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epg.c b/epg.c
index 9b24da46..15a2b0b0 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* 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.65 2006/02/28 13:56:05 kls Exp $
+ * $Id: epg.c 1.66 2006/03/25 11:43:00 kls Exp $
*/
#include "epg.h"
@@ -677,8 +677,10 @@ const cEvent *cSchedule::GetPresentEvent(void) const
const cEvent *pe = NULL;
time_t now = time(NULL);
for (cEvent *p = events.First(); p; p = events.Next(p)) {
- if (p->StartTime() <= now && now < p->EndTime())
+ if (p->StartTime() <= now)
pe = p;
+ else if (p->StartTime() > now + 3600)
+ break;
if (p->SeenWithin(RUNNINGSTATUSTIMEOUT) && p->RunningStatus() >= SI::RunningStatusPausing)
return p;
}