mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user