add {vdrHasTimers} to vdrstatus - can be used in skins for e.g. REC/SCHED/FREE (in combination with {vdrIsRecording})

This commit is contained in:
Peter Bieringer 2021-05-04 07:33:08 +02:00
parent 589749731f
commit 39c1062353
4 changed files with 10 additions and 2 deletions

View File

@ -505,5 +505,6 @@ Version 1.2.15
- [kamel5] Fix cutting marks wasn't updated
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
- [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
- [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>