From 32b78b2f57b48da1f3461edbec0108ad571b92d0 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 6 May 2016 09:03:31 +0200 Subject: [PATCH] fixed timer recording detection in main menu --- coreengine/viewelementsdisplaymenu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/coreengine/viewelementsdisplaymenu.c b/coreengine/viewelementsdisplaymenu.c index 51349c7..0d47895 100644 --- a/coreengine/viewelementsdisplaymenu.c +++ b/coreengine/viewelementsdisplaymenu.c @@ -3,6 +3,7 @@ #include #include "../extensions/helpers.h" #include "../extensions/globaltimers.h" +#include "../services/epgtimer.h" #include #include #include @@ -408,10 +409,17 @@ bool cVeDmTimers::Parse(bool forced) { tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::channelid, *channelID); tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::channellogoexists, imgCache->LogoExists(*channelID) ? "1" : "0"); } - tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::recording, Timer->Recording() ? "1" : "0"); + bool isRecording = Timer->Recording(); + if (!isRecording) { + if (cEpgTimer_Interface_V1* epgTimer = dynamic_cast((cTimer*)Timer)) { + if (epgTimer->State() == 'R') + isRecording = true; + } + } + tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::recording, isRecording ? "1" : "0"); cString timerDate(""); - if (Timer->Recording()) { + if (isRecording) { timerDate = cString::sprintf("-%s", *TimeString(Timer->StopTime())); } else { time_t Now = time(NULL);