expose isRadio to menuchannel

This commit is contained in:
Peter Bieringer 2021-01-21 08:59:43 +01:00
parent 4c4b9f7837
commit f3f4ee2d48
3 changed files with 13 additions and 1 deletions

View File

@ -966,6 +966,7 @@ enum class eLeMenuChannelsIT {
isSat,
isTerr,
isEncrypted,
isRadio,
count
};
@ -1011,6 +1012,7 @@ enum class eCeMenuChannelsIT {
isSat,
isTerr,
isEncrypted,
isRadio,
presenteventduration,
presenteventdurationhours,
presenteventelapsed,

View File

@ -1073,6 +1073,7 @@ void cLeMenuChannels::SetTokenContainer(void) {
tokenContainer->DefineIntToken("{isSat}", (int)eLeMenuChannelsIT::isSat);
tokenContainer->DefineIntToken("{isTerr}", (int)eLeMenuChannelsIT::isTerr);
tokenContainer->DefineIntToken("{isEncrypted}", (int)eLeMenuChannelsIT::isEncrypted);
tokenContainer->DefineIntToken("{isRadio}", (int)eLeMenuChannelsIT::isRadio);
InheritTokenContainer();
}
@ -1092,6 +1093,8 @@ bool cLeMenuChannels::Parse(bool forced) {
if (!dirty)
return false;
bool isRadio = !channel->Vpid() && channel->Apid(0);
tokenContainer->Clear();
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::nummenuitem, num);
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::current, current);
@ -1100,6 +1103,7 @@ bool cLeMenuChannels::Parse(bool forced) {
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::transponder, channel->Transponder());
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::frequency, channel->Frequency());
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::isEncrypted, channel->Ca());
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::isRadio, isRadio);
tokenContainer->AddStringToken((int)eLeMenuChannelsST::name, channel->Name());
cString channelID = channel->GetChannelID().ToString();
@ -1196,6 +1200,7 @@ void cCeMenuChannels::SetTokenContainer(void) {
tokenContainer->DefineIntToken("{isSat}", (int)eCeMenuChannelsIT::isSat);
tokenContainer->DefineIntToken("{isTerr}", (int)eCeMenuChannelsIT::isTerr);
tokenContainer->DefineIntToken("{isEncrypted}", (int)eCeMenuChannelsIT::isEncrypted);
tokenContainer->DefineIntToken("{isRadio}", (int)eCeMenuChannelsIT::isRadio);
tokenContainer->DefineIntToken("{presenteventelapsed}", (int)eCeMenuChannelsIT::presenteventelapsed);
tokenContainer->DefineIntToken("{presenteventduration}", (int)eCeMenuChannelsIT::presenteventduration);
tokenContainer->DefineIntToken("{presenteventdurationhours}", (int)eCeMenuChannelsIT::presenteventdurationhours);
@ -1227,6 +1232,8 @@ bool cCeMenuChannels::Parse(bool forced) {
if (!dirty)
return false;
bool isRadio = !channel->Vpid() && channel->Apid(0);
tokenContainer->Clear();
SetListTokens(tokenContainer);
@ -1235,6 +1242,7 @@ bool cCeMenuChannels::Parse(bool forced) {
tokenContainer->AddIntToken((int)eCeMenuChannelsIT::transponder, channel->Transponder());
tokenContainer->AddIntToken((int)eCeMenuChannelsIT::frequency, channel->Frequency());
tokenContainer->AddIntToken((int)eCeMenuChannelsIT::isEncrypted, channel->Ca());
tokenContainer->AddIntToken((int)eCeMenuChannelsIT::isRadio, isRadio);
tokenContainer->AddStringToken((int)eCeMenuChannelsST::name, channel->Name());
cString channelID = channel->GetChannelID().ToString();

View File

@ -16,6 +16,7 @@
{isSat} true if channel is a satellite channel
{isTerr} true if channel is terrestrical
{isEncrypted} true if channel is encrypted
{isRadio} true if channel is a radio channel
{presenteventtitle} title of present event on this channel
{presenteventstart} present event start time in hh::mm
{presenteventstop} present event event stop time in hh::mm
@ -44,6 +45,7 @@
{isSat} true if channel is a satellite channel
{isTerr} true if channel is terrestrical
{isEncrypted} true if channel is encrypted
{isRadio} true if channel is a radio channel
{presenteventtitle} title of present event on this channel
{presenteventstart} present event start time in hh::mm
{presenteventstop} present event stop time in hh::mm
@ -84,4 +86,4 @@
</menuitems>
</menuchannels>
</menuchannels>