mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Fixed a problem in cSchedule::Sort(), in case hasRunning was true, but there was no event with RunningStatus() >= SI::RunningStatusPausing
This commit is contained in:
parent
f786510ba2
commit
ec5b1aadab
@ -2581,6 +2581,8 @@ Markus Ehrnsperger <markus.ehrnsperger@googlemail.com>
|
|||||||
for suggesting to add the lines from 'Fixed a timeout in cDvbDevice while tuning after
|
for suggesting to add the lines from 'Fixed a timeout in cDvbDevice while tuning after
|
||||||
the frontend has been reopened' to cDvbTuner::ProvidesFrontend()
|
the frontend has been reopened' to cDvbTuner::ProvidesFrontend()
|
||||||
for improving the error message when closing a frontend
|
for improving the error message when closing a frontend
|
||||||
|
for reporting a problem in cSchedule::Sort(), in case hasRunning was true, but there
|
||||||
|
was no event with RunningStatus() >= SI::RunningStatusPausing
|
||||||
|
|
||||||
Werner Färber <w.faerber@gmx.de>
|
Werner Färber <w.faerber@gmx.de>
|
||||||
for reporting a bug in handling the cPluginManager::Active() result when pressing
|
for reporting a bug in handling the cPluginManager::Active() result when pressing
|
||||||
|
4
HISTORY
4
HISTORY
@ -9984,7 +9984,7 @@ Video Disk Recorder Revision History
|
|||||||
version numbering. Version numbers are simply counted upwards, with each of the three
|
version numbering. Version numbers are simply counted upwards, with each of the three
|
||||||
parts ("version", "major", "minor") always being a single digit, and '0' being skipped.
|
parts ("version", "major", "minor") always being a single digit, and '0' being skipped.
|
||||||
|
|
||||||
2024-09-12:
|
2024-09-14:
|
||||||
|
|
||||||
- Fix for compilers that don't like non-constant format strings (thanks to Stefan Hofmann).
|
- Fix for compilers that don't like non-constant format strings (thanks to Stefan Hofmann).
|
||||||
- Deprecated code is now marked with [[deprecated]] to issue a compile time warning when
|
- Deprecated code is now marked with [[deprecated]] to issue a compile time warning when
|
||||||
@ -9993,3 +9993,5 @@ Video Disk Recorder Revision History
|
|||||||
VDRVERSION is incremented (originally suggested by Winfried Köhler, with contributions
|
VDRVERSION is incremented (originally suggested by Winfried Köhler, with contributions
|
||||||
from Lars Hanisch and Manuel Reimer).
|
from Lars Hanisch and Manuel Reimer).
|
||||||
APIVERSNUM is now 30003.
|
APIVERSNUM is now 30003.
|
||||||
|
- Fixed a problem in cSchedule::Sort(), in case hasRunning was true, but there was no event
|
||||||
|
with RunningStatus() >= SI::RunningStatusPausing (reported by Markus Ehrnsperger).
|
||||||
|
15
epg.c
15
epg.c
@ -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 5.9 2024/06/21 06:27:20 kls Exp $
|
* $Id: epg.c 5.10 2024/09/14 14:17:12 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "epg.h"
|
#include "epg.h"
|
||||||
@ -928,7 +928,6 @@ cSchedule::cSchedule(tChannelID ChannelID)
|
|||||||
channelID = ChannelID;
|
channelID = ChannelID;
|
||||||
events.SetUseGarbageCollector();
|
events.SetUseGarbageCollector();
|
||||||
numTimers = 0;
|
numTimers = 0;
|
||||||
hasRunning = false;
|
|
||||||
modified = 0;
|
modified = 0;
|
||||||
onActualTp = false;
|
onActualTp = false;
|
||||||
presentSeen = 0;
|
presentSeen = 0;
|
||||||
@ -1068,7 +1067,6 @@ const cEvent *cSchedule::GetEventAround(time_t Time) const
|
|||||||
|
|
||||||
void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, const cChannel *Channel)
|
void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, const 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) {
|
||||||
@ -1078,25 +1076,20 @@ void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, const cChanne
|
|||||||
}
|
}
|
||||||
else if (RunningStatus >= SI::RunningStatusPausing && p->StartTime() < Event->StartTime())
|
else if (RunningStatus >= SI::RunningStatusPausing && p->StartTime() < Event->StartTime())
|
||||||
p->SetRunningStatus(SI::RunningStatusNotRunning, Channel);
|
p->SetRunningStatus(SI::RunningStatusNotRunning, Channel);
|
||||||
if (p->RunningStatus() >= SI::RunningStatusPausing)
|
|
||||||
hasRunning = true;
|
|
||||||
}
|
}
|
||||||
SetPresentSeen();
|
SetPresentSeen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSchedule::ClrRunningStatus(cChannel *Channel)
|
void cSchedule::ClrRunningStatus(cChannel *Channel)
|
||||||
{
|
{
|
||||||
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::RunningStatusPausing) {
|
if (p->RunningStatus() >= SI::RunningStatusPausing) {
|
||||||
p->SetRunningStatus(SI::RunningStatusNotRunning, Channel);
|
p->SetRunningStatus(SI::RunningStatusNotRunning, Channel);
|
||||||
hasRunning = false;
|
|
||||||
SetModified();
|
SetModified();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void cSchedule::ResetVersions(void)
|
void cSchedule::ResetVersions(void)
|
||||||
{
|
{
|
||||||
@ -1108,11 +1101,11 @@ void cSchedule::Sort(void)
|
|||||||
{
|
{
|
||||||
events.Sort();
|
events.Sort();
|
||||||
// Make sure there are no RunningStatusUndefined before the currently running event:
|
// Make sure there are no RunningStatusUndefined before the currently running event:
|
||||||
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::RunningStatusPausing)
|
if (p->RunningStatus() >= SI::RunningStatusPausing) {
|
||||||
break;
|
for (p = events.Prev(p); p; p = events.Prev(p))
|
||||||
p->SetRunningStatus(SI::RunningStatusNotRunning);
|
p->SetRunningStatus(SI::RunningStatusNotRunning);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetModified();
|
SetModified();
|
||||||
|
3
epg.h
3
epg.h
@ -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.h 5.5 2024/09/09 22:15:59 kls Exp $
|
* $Id: epg.h 5.6 2024/09/14 14:17:12 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __EPG_H
|
#ifndef __EPG_H
|
||||||
@ -157,7 +157,6 @@ private:
|
|||||||
cHash<cEvent> eventsHashID;
|
cHash<cEvent> eventsHashID;
|
||||||
cHash<cEvent> eventsHashStartTime;
|
cHash<cEvent> eventsHashStartTime;
|
||||||
mutable u_int16_t numTimers;// The number of timers that use this schedule
|
mutable u_int16_t numTimers;// The number of timers that use this schedule
|
||||||
bool hasRunning;
|
|
||||||
bool onActualTp;
|
bool onActualTp;
|
||||||
int modified;
|
int modified;
|
||||||
time_t presentSeen;
|
time_t presentSeen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user