From c325fe76ee94f0335486269362d0404def27d8d1 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 5 Aug 2006 10:15:34 +0200 Subject: 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) --- HISTORY | 4 +++- eit.c | 7 +++---- epg.c | 11 ++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/HISTORY b/HISTORY index 35d1815e..54a16c62 100644 --- a/HISTORY +++ b/HISTORY @@ -4835,7 +4835,7 @@ Video Disk Recorder Revision History only done for normal keypresses, not for repeated ones. This allows the user to scroll the value all the way to the limit by keeping the key pressed. -2006-07-30: Version 1.4.1-3 +2006-08-05: Version 1.4.1-3 - Fixed assigning schedules to channels in case there is no initial EPG information (thanks to Frank Schmirler). @@ -4846,3 +4846,5 @@ Video Disk Recorder Revision History to Udo Richter). - The /video/.update file is now touched _after_ an editing process is finished in order to avoid excessive disk access (thanks to Artur Skawina). +- 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). diff --git a/eit.c b/eit.c index d9714ef8..fc65bc9c 100644 --- a/eit.c +++ b/eit.c @@ -8,7 +8,7 @@ * Robert Schneider and Rolf Hakenes . * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg . * - * $Id: eit.c 1.119 2006/07/22 09:21:59 kls Exp $ + * $Id: eit.c 1.120 2006/08/05 10:01:21 kls Exp $ */ #include "eit.h" @@ -94,6 +94,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo pEvent->SetStartTime(SiEitEvent.getStartTime()); pEvent->SetDuration(SiEitEvent.getDuration()); } + if (newEvent) + pSchedule->AddEvent(newEvent); if (Tid == 0x4E) { // we trust only the present/following info on the actual TS if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning) pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus(), channel); @@ -240,9 +242,6 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo delete ExtendedEventDescriptors; delete ShortEventDescriptor; - if (newEvent) - pSchedule->AddEvent(newEvent); - pEvent->SetComponents(Components); pEvent->FixEpgBugs(); diff --git a/epg.c b/epg.c index 0b9eb965..b8b6b64d 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 and Rolf Hakenes . * - * $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); } -- cgit v1.2.3