From f3f4ee2d482b46af937f95b8820c65413465b1b0 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Thu, 21 Jan 2021 08:59:43 +0100 Subject: expose isRadio to menuchannel --- coreengine/definitions.h | 2 ++ coreengine/listelements.c | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'coreengine') diff --git a/coreengine/definitions.h b/coreengine/definitions.h index dccd50e..413682b 100644 --- a/coreengine/definitions.h +++ b/coreengine/definitions.h @@ -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, diff --git a/coreengine/listelements.c b/coreengine/listelements.c index a77ff0e..0c4a387 100644 --- a/coreengine/listelements.c +++ b/coreengine/listelements.c @@ -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(); -- cgit v1.2.3