From 6972a59e1b86989167fb3f3b2b1dc02612d72b4a Mon Sep 17 00:00:00 2001 From: kamel5 Date: Mon, 8 Feb 2021 10:58:00 +0100 Subject: [PATCH] A bug with timeshift in connection with global timers has been fixed With commit 8a04a17 an error was introduced which did not take the global timers into account in the timeshift replay. thanks to @machtnix at vdr-portal.de for finding the bug --- coreengine/viewdisplayreplay.c | 3 ++- coreengine/viewdisplayreplay.h | 2 +- displayreplay.c | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coreengine/viewdisplayreplay.c b/coreengine/viewdisplayreplay.c index b89edc5..f871afb 100644 --- a/coreengine/viewdisplayreplay.c +++ b/coreengine/viewdisplayreplay.c @@ -182,7 +182,7 @@ void cViewReplay::SetRecording(const cRecording *recording) { } } -void cViewReplay::GetTimers(void) { +void cViewReplay::GetGlobalTimers(void) { if (!timersLoaded) { timersLoaded = true; globalTimers.LoadTimers(); @@ -198,6 +198,7 @@ void cViewReplay::SetTimeShiftValues(const cRecording *recording) { if (usage & ruTimer) isTimeShift = true; else { + GetGlobalTimers(); if (globalTimers.IsRecording(recording)) isTimeShift = true; } diff --git a/coreengine/viewdisplayreplay.h b/coreengine/viewdisplayreplay.h index 9098275..0dc682a 100644 --- a/coreengine/viewdisplayreplay.h +++ b/coreengine/viewdisplayreplay.h @@ -32,6 +32,7 @@ private: cString timeShiftDuration; bool timersLoaded; cGlobalTimers globalTimers; + void GetGlobalTimers(void); void SetViewElements(void); void ClearVariables(void); void SetViewElementObjects(void); @@ -45,7 +46,6 @@ public: void SetTimeShift(int framesTotal, int timeShiftLength); void SetRecording(const cRecording *recording); void SetTitle(const char *title); - void GetTimers(void); void SetTimeShiftValues(const cRecording *recording); void SetCurrent(const char *current); void SetTotal(const char *total); diff --git a/displayreplay.c b/displayreplay.c index a3a1c8b..9921a9d 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -85,6 +85,5 @@ void cSDDisplayReplay::SetMessage(eMessageType Type, const char *Text) { void cSDDisplayReplay::Flush(void) { if (!ok) return; - view->GetTimers(); view->Flush(); }