diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-08-05 10:15:34 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-08-05 10:15:34 +0200 |
commit | c325fe76ee94f0335486269362d0404def27d8d1 (patch) | |
tree | 9117c4c79e26293232c845082cf8ee9b8373f0db /epg.c | |
parent | ae4633feb04b4665ea561dea4c88dea28e8d9032 (diff) | |
download | vdr-c325fe76ee94f0335486269362d0404def27d8d1.tar.gz vdr-c325fe76ee94f0335486269362d0404def27d8d1.tar.bz2 |
Fixed handling the running status of EPG events before the currently running one, in case they are added after the current event (cont'd from version 1.4.1-2)
Diffstat (limited to 'epg.c')
-rw-r--r-- | epg.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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.78 2006/07/29 09:38:55 kls Exp $ + * $Id: epg.c 1.79 2006/08/05 10:04:17 kls Exp $ */ #include "epg.h" @@ -647,7 +647,7 @@ Final: cSchedule::cSchedule(tChannelID ChannelID) { channelID = ChannelID; - hasRunning = false;; + hasRunning = false; modified = 0; presentSeen = 0; } @@ -738,6 +738,7 @@ const cEvent *cSchedule::GetEventAround(time_t Time) const void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel) { + hasRunning = false; for (cEvent *p = events.First(); p; p = events.Next(p)) { if (p == Event) { if (p->RunningStatus() > SI::RunningStatusNotRunning || RunningStatus > SI::RunningStatusNotRunning) @@ -745,9 +746,9 @@ void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Cha } else if (RunningStatus >= SI::RunningStatusPausing && p->StartTime() < Event->StartTime()) p->SetRunningStatus(SI::RunningStatusNotRunning); + if (p->RunningStatus() >= SI::RunningStatusPausing) + hasRunning = true; } - if (RunningStatus >= SI::RunningStatusPausing) - hasRunning = true; } void cSchedule::ClrRunningStatus(cChannel *Channel) @@ -775,7 +776,7 @@ void cSchedule::Sort(void) // 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) + if (p->RunningStatus() >= SI::RunningStatusPausing) break; p->SetRunningStatus(SI::RunningStatusNotRunning); } |