Speeded up determining the timer status of events in the Schedules menus

This commit is contained in:
Klaus Schmidinger
2025-06-20 10:20:22 +02:00
parent 7b258fd5f6
commit 9d2a8379f1
2 changed files with 5 additions and 3 deletions

View File

@@ -10119,7 +10119,7 @@ Video Disk Recorder Revision History
- Now deleting old recording info before reading modified info file (suggested by
Stefan Hofmann).
2025-06-19:
2025-06-20:
- Fixed some misplaced 'override' keywords in the 'hello' and 'skincurses' plugins.
- cRecording now fetches priority, lifetime and framesPerSecond from cRecordingInfo.
@@ -10133,3 +10133,4 @@ Video Disk Recorder Revision History
- Fixed automatic moving of the cursor when inputting characters with number keys (reported
by Stefan Hofmann).
- Fixed updating the index when cutting a recording again (thanks to Matthias Senzel).
- Speeded up determining the timer status of events in the Schedules menus.

5
menu.c
View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 5.27 2025/04/18 09:48:11 kls Exp $
* $Id: menu.c 5.28 2025/06/20 10:20:22 kls Exp $
*/
#include "menu.h"
@@ -1614,7 +1614,8 @@ bool cMenuScheduleItem::Update(const cTimers *Timers, bool Force)
LOCK_SCHEDULES_READ;
eTimerMatch OldTimerMatch = timerMatch;
bool OldTimerActive = timerActive;
timer = Timers->GetMatch(event, &timerMatch);
if (event->Schedule() && event->Schedule()->HasTimer())
timer = Timers->GetMatch(event, &timerMatch);
if (event->EndTime() < time(NULL) && !event->IsRunning() && (!timer || !timer->Recording()))
timerMatch = tmNone;
timerActive = timer && timer->HasFlags(tfActive);