mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02: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:
parent
4b2861e030
commit
09925e6113
3
HISTORY
3
HISTORY
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user