Merge branch 'pbiering/vdrHasTimers'

This commit is contained in:
kamel5 2021-05-05 11:33:10 +02:00
commit 0159d536d0
4 changed files with 8 additions and 0 deletions

View File

@ -510,3 +510,4 @@ Upcoming for Version 1.2.16+
- [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
- [pbiering] add {vdrHasTimers} to vdrstatus - can be used in skins for e.g. REC/SCHED/FREE (in combination with {vdrIsRecording})

View File

@ -739,6 +739,7 @@ enum class eDMVdrstatisticsIT {
enum class eDMVdrstatusIT {
vdrIsRecordingsHandlersActive,
vdrIsRecording,
vdrHasTimers,
count
};

View File

@ -883,6 +883,7 @@ void cVeDmVdrstatus::SetTokenContainer(void) {
tokenContainer = new skindesignerapi::cTokenContainer();
tokenContainer->DefineIntToken("{vdrIsRecordingsHandlersActive}", (int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive);
tokenContainer->DefineIntToken("{vdrIsRecording}", (int)eDMVdrstatusIT::vdrIsRecording);
tokenContainer->DefineIntToken("{vdrHasTimers}", (int)eDMVdrstatusIT::vdrHasTimers);
InheritTokenContainer();
}
@ -890,9 +891,13 @@ bool cVeDmVdrstatus::Parse(bool forced) {
if (!cViewElement::Parse(forced))
return false;
cGlobalTimers globalTimers;
globalTimers.LoadTimers();
tokenContainer->Clear();
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive, RecordingsHandler.Active());
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecording, cRecordControls::Active());
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrHasTimers, (globalTimers.Size() > 0));
SetDirty();
return true;
}

View File

@ -94,6 +94,7 @@
<!-- Available Variables vdrstatus
{vdrIsRecordingsHandlersActive} true if active RecordingsHandlers (cut,copy,move) aka "busy"
{vdrIsRecording} true if active recording
{vdrHasTimers} true if numtimers > 0
-->
<vdrstatus>
</vdrstatus>