From 9d2a8379f170654936a4c048b502a19a422821fd Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 20 Jun 2025 10:20:22 +0200 Subject: [PATCH] Speeded up determining the timer status of events in the Schedules menus --- HISTORY | 3 ++- menu.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index 56ded147..721f90a6 100644 --- a/HISTORY +++ b/HISTORY @@ -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. diff --git a/menu.c b/menu.c index 66d691ab..16661d0c 100644 --- a/menu.c +++ b/menu.c @@ -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);