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 /extensions | |
| 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.
Diffstat (limited to 'extensions')
| -rw-r--r-- | extensions/globaltimers.c | 8 |
1 files changed, 6 insertions, 2 deletions
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;
}
|
