1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

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)

This commit is contained in:
Klaus Schmidinger 2006-08-05 10:15:34 +02:00
parent ae4633feb0
commit c325fe76ee
3 changed files with 12 additions and 10 deletions

View File

@ -4835,7 +4835,7 @@ Video Disk Recorder Revision History
only done for normal keypresses, not for repeated ones. This allows the user to 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. 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 - Fixed assigning schedules to channels in case there is no initial EPG information
(thanks to Frank Schmirler). (thanks to Frank Schmirler).
@ -4846,3 +4846,5 @@ Video Disk Recorder Revision History
to Udo Richter). to Udo Richter).
- The /video/.update file is now touched _after_ an editing process is finished - The /video/.update file is now touched _after_ an editing process is finished
in order to avoid excessive disk access (thanks to Artur Skawina). 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).

7
eit.c
View File

@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>. * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
* *
* $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" #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->SetStartTime(SiEitEvent.getStartTime());
pEvent->SetDuration(SiEitEvent.getDuration()); pEvent->SetDuration(SiEitEvent.getDuration());
} }
if (newEvent)
pSchedule->AddEvent(newEvent);
if (Tid == 0x4E) { // we trust only the present/following info on the actual TS if (Tid == 0x4E) { // we trust only the present/following info on the actual TS
if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning) if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning)
pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus(), channel); 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 ExtendedEventDescriptors;
delete ShortEventDescriptor; delete ShortEventDescriptor;
if (newEvent)
pSchedule->AddEvent(newEvent);
pEvent->SetComponents(Components); pEvent->SetComponents(Components);
pEvent->FixEpgBugs(); pEvent->FixEpgBugs();

11
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * 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" #include "epg.h"
@ -647,7 +647,7 @@ Final:
cSchedule::cSchedule(tChannelID ChannelID) cSchedule::cSchedule(tChannelID ChannelID)
{ {
channelID = ChannelID; channelID = ChannelID;
hasRunning = false;; hasRunning = false;
modified = 0; modified = 0;
presentSeen = 0; presentSeen = 0;
} }
@ -738,6 +738,7 @@ const cEvent *cSchedule::GetEventAround(time_t Time) const
void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel) void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel)
{ {
hasRunning = false;
for (cEvent *p = events.First(); p; p = events.Next(p)) { for (cEvent *p = events.First(); p; p = events.Next(p)) {
if (p == Event) { if (p == Event) {
if (p->RunningStatus() > SI::RunningStatusNotRunning || RunningStatus > SI::RunningStatusNotRunning) if (p->RunningStatus() > SI::RunningStatusNotRunning || RunningStatus > SI::RunningStatusNotRunning)
@ -745,10 +746,10 @@ void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Cha
} }
else if (RunningStatus >= SI::RunningStatusPausing && p->StartTime() < Event->StartTime()) else if (RunningStatus >= SI::RunningStatusPausing && p->StartTime() < Event->StartTime())
p->SetRunningStatus(SI::RunningStatusNotRunning); p->SetRunningStatus(SI::RunningStatusNotRunning);
} if (p->RunningStatus() >= SI::RunningStatusPausing)
if (RunningStatus >= SI::RunningStatusPausing)
hasRunning = true; hasRunning = true;
} }
}
void cSchedule::ClrRunningStatus(cChannel *Channel) void cSchedule::ClrRunningStatus(cChannel *Channel)
{ {
@ -775,7 +776,7 @@ void cSchedule::Sort(void)
// Make sure there are no RunningStatusUndefined before the currently running event: // Make sure there are no RunningStatusUndefined before the currently running event:
if (hasRunning) { if (hasRunning) {
for (cEvent *p = events.First(); p; p = events.Next(p)) { for (cEvent *p = events.First(); p; p = events.Next(p)) {
if (p->RunningStatus() > SI::RunningStatusNotRunning) if (p->RunningStatus() >= SI::RunningStatusPausing)
break; break;
p->SetRunningStatus(SI::RunningStatusNotRunning); p->SetRunningStatus(SI::RunningStatusNotRunning);
} }