diff options
| author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-04-30 17:56:21 +0200 |
|---|---|---|
| committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-05-04 14:38:52 +0200 |
| commit | 09925e6113d1b2dd9b68c8c3196371ef8f7f77ee (patch) | |
| tree | 0d722b8ffc0e986c1a37ab84084bef937134f32a | |
| parent | 4b2861e030d7207a3182f02072adda098fa993fe (diff) | |
| download | vdr-plugin-skindesigner-09925e6113d1b2dd9b68c8c3196371ef8f7f77ee.tar.gz vdr-plugin-skindesigner-09925e6113d1b2dd9b68c8c3196371ef8f7f77ee.tar.bz2 | |
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.
| -rw-r--r-- | HISTORY | 3 | ||||
| -rw-r--r-- | coreengine/viewdisplayreplay.c | 2 | ||||
| -rw-r--r-- | extensions/globaltimers.c | 8 |
3 files changed, 10 insertions, 3 deletions
@@ -507,3 +507,6 @@ Version 1.2.15 Upcoming for Version 1.2.16+ - [pbiering] add additional recording flag "isInUse" - can be used in skins for e.g. records in cutting/copy(queue) - [pbiering] add additional vdrstatus exposing "vdrIsRecordingsHandlersActive" and "vdrIsRecording" - can be used in skins for e.g. IDLE/BUSY REC/FREE +- [kamel5] Fix Incorrect detection of a recording that is currently running +- [kamel5] Fix segfault with mpv plugin (thx to @lnj at vdr-portal.de) +- [kamel5] Update skin estuary4vdr diff --git a/coreengine/viewdisplayreplay.c b/coreengine/viewdisplayreplay.c index 1ee8684..757c898 100644 --- a/coreengine/viewdisplayreplay.c +++ b/coreengine/viewdisplayreplay.c @@ -177,9 +177,9 @@ void cViewReplay::GetGlobalTimers(void) { } void cViewReplay::SetTimeShiftValues(int current, int total) { + timeShiftActive = NoRec; if (!recording) return; - timeShiftActive = NoRec; #if APIVERSNUM >= 20101 int usage = recording->IsInUse(); if (usage & ruTimer) 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; i<size; i++) {
const cTimer *t = At(i);
const char *timerFile = t->File();
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;
}
|
