summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-07-22 09:20:32 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-07-22 09:20:32 +0200
commitc4743d1d26f01db04c6deceabd4d3875476c8e39 (patch)
tree02e78d83d4dedc000c9c3f8efa9867ae16507fc4 /epg.c
parentf936447c25756f28aed93a6b4da0b9cbb0093053 (diff)
downloadvdr-c4743d1d26f01db04c6deceabd4d3875476c8e39.tar.gz
vdr-c4743d1d26f01db04c6deceabd4d3875476c8e39.tar.bz2
Fixed handling the running status of EPG events before the currently running one, in case they are added after the current event
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/epg.c b/epg.c
index 566f20ee..3afecc35 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.75 2006/05/25 14:55:36 kls Exp $
+ * $Id: epg.c 1.76 2006/07/22 09:13:15 kls Exp $
*/
#include "epg.h"
@@ -770,6 +770,14 @@ void cSchedule::ResetVersions(void)
void cSchedule::Sort(void)
{
events.Sort();
+ // Make sure there are no RunningStatusUndefined before the currently running event:
+ if (hasRunning) {
+ for (cEvent *p = events.First(); p; p = events.Next(p)) {
+ if (p->RunningStatus() > SI::RunningStatusNotRunning)
+ break;
+ p->SetRunningStatus(SI::RunningStatusNotRunning);
+ }
+ }
}
void cSchedule::DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version)