From 09925e6113d1b2dd9b68c8c3196371ef8f7f77ee Mon Sep 17 00:00:00 2001 From: kamel5 Date: Fri, 30 Apr 2021 17:56:21 +0200 Subject: Fix Incorrect detection of a recording that is currently running To set timeShiftActive correctly, it is not sufficient to compare the name of the recording and the timer in cGlobalTimers::IsRecording() if no short text is available. Therefore, the start time of both is now also compared. --- extensions/globaltimers.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'extensions') diff --git a/extensions/globaltimers.c b/extensions/globaltimers.c index 8de97ce..95f0a52 100644 --- a/extensions/globaltimers.c +++ b/extensions/globaltimers.c @@ -177,14 +177,18 @@ bool cGlobalTimers::IsRecording(const cRecording *rec) { if (!rec || !rec->Name()) return false; std::string recName = rec->Name(); + time_t recstart = rec->Start(); int size = Size(); for (int i=0; iFile(); if (!t->Matches() || !timerFile) continue; - if (recName.find(timerFile) != std::string::npos) - return true; + if (recName.find(timerFile) != std::string::npos) { + time_t timerstart = t->StartTime(); + if (recstart == timerstart) + return true; + } } return false; } -- cgit v1.2.3