From 49978e0db8a15aa66fb49cd895e959a86ba8007f Mon Sep 17 00:00:00 2001 From: MartB Date: Thu, 15 Jul 2021 00:18:15 +0200 Subject: [PATCH] e2: Add missing radio service type 0x0A This fixes the lack of "advanced codec" radio channels in the list, as they are now getting correctly classified. Can be tested with the new Astra 19.2 AAC offerings, e.g: SWR3 1:0:A:28CB:40F:1:C00000:0:0:0: See Table 87 in https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.15.01_60/en_300468v011501p.pdf --- src/enigma2/data/Channel.cpp | 2 +- src/enigma2/data/Channel.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/enigma2/data/Channel.cpp b/src/enigma2/data/Channel.cpp index ff90f257..07718f46 100644 --- a/src/enigma2/data/Channel.cpp +++ b/src/enigma2/data/Channel.cpp @@ -222,7 +222,7 @@ bool Channel::HasRadioServiceType() if (found != std::string::npos) radioServiceType = radioServiceType.substr(0, found); - return radioServiceType == RADIO_SERVICE_TYPE; + return std::find(RADIO_SERVICE_TYPES.begin(), RADIO_SERVICE_TYPES.end(), radioServiceType) != RADIO_SERVICE_TYPES.end(); } void Channel::UpdateTo(kodi::addon::PVRChannel& left) const diff --git a/src/enigma2/data/Channel.h b/src/enigma2/data/Channel.h index 0c38b71d..5a4a422d 100644 --- a/src/enigma2/data/Channel.h +++ b/src/enigma2/data/Channel.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -28,7 +29,8 @@ namespace enigma2 public: const std::string SERVICE_REF_GENERIC_PREFIX = "1:0:1:"; const std::string SERVICE_REF_GENERIC_POSTFIX = ":0:0:0"; - const std::string RADIO_SERVICE_TYPE = "2"; + // There are at least two different service types for radio, see EN300468 Table 87 + const std::array RADIO_SERVICE_TYPES = {"2", "A", "a"}; Channel() = default; Channel(const Channel &c) : BaseChannel(c), m_channelNumber(c.GetChannelNumber()), m_standardServiceReference(c.GetStandardServiceReference()),