From b0fcbf39ba1804c29fa37699c4df7d9c199d6333 Mon Sep 17 00:00:00 2001 From: ksooo <3226626+ksooo@users.noreply.github.com> Date: Fri, 13 Sep 2024 08:29:22 +0200 Subject: [PATCH 1/2] Fix pointless custom prop not found logspam. --- pvr.hts/addon.xml.in | 2 +- pvr.hts/changelog.txt | 3 +++ src/tvheadend/CustomTimerProperties.cpp | 17 ++++++++++------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pvr.hts/addon.xml.in b/pvr.hts/addon.xml.in index 6949f098..d1feb6d4 100644 --- a/pvr.hts/addon.xml.in +++ b/pvr.hts/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt index b71e3bf2..1b7f5cdc 100644 --- a/pvr.hts/changelog.txt +++ b/pvr.hts/changelog.txt @@ -1,3 +1,6 @@ +v22.4.1 +- Fix pointless "Unknown property" log spam introduced with v22.4.0 + v22.4.0 - PVR Add-on API v9.1.0 - Add support for Autorec property "Broadcast type" (HTSPv39+) diff --git a/src/tvheadend/CustomTimerProperties.cpp b/src/tvheadend/CustomTimerProperties.cpp index 00454426..884ce5da 100644 --- a/src/tvheadend/CustomTimerProperties.cpp +++ b/src/tvheadend/CustomTimerProperties.cpp @@ -33,6 +33,10 @@ std::vector CustomTimerProperties::GetPrope { std::vector customProps; GetCommonProperties(customProps, rec); + + if (customProps.size() < m_propIds.size()) + Logger::Log(LogLevel::LEVEL_ERROR, "Not all properties handled!"); + return customProps; } @@ -55,10 +59,13 @@ std::vector CustomTimerProperties::GetPrope break; } default: - Logger::Log(LogLevel::LEVEL_ERROR, "Unknown property %u", propId); break; } } + + if (customProps.size() < m_propIds.size()) + Logger::Log(LogLevel::LEVEL_ERROR, "Not all properties handled!"); + return customProps; } @@ -85,14 +92,11 @@ void CustomTimerProperties::GetCommonProperties( { // User comment if (m_conn.GetProtocol() >= 42) - { - /* user comment */ props.emplace_back(CUSTOM_PROP_ID_DVR_COMMENT, rec.GetComment()); - break; - } + + break; } default: - Logger::Log(LogLevel::LEVEL_ERROR, "Unknown property %u", propId); break; } } @@ -189,7 +193,6 @@ const std::vector CustomTimerProperties::GetPossib // DVR configuration if (m_conn.GetProtocol() >= 40) { - // DVR configuration std::vector dvrConfigValues; for (const auto& entry : m_dvrConfigs) { From 709d03c9be0b4172dbc134ad84075452e910b09f Mon Sep 17 00:00:00 2001 From: ksooo <3226626+ksooo@users.noreply.github.com> Date: Fri, 13 Sep 2024 08:35:36 +0200 Subject: [PATCH 2/2] Fix update of 'DVR configuration' property not working due to duplicate member after refactoring recording entity class hierarchy. --- pvr.hts/changelog.txt | 1 + src/tvheadend/entity/Recording.h | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt index 1b7f5cdc..f2cdc23b 100644 --- a/pvr.hts/changelog.txt +++ b/pvr.hts/changelog.txt @@ -1,5 +1,6 @@ v22.4.1 - Fix pointless "Unknown property" log spam introduced with v22.4.0 +- Fix update of "DVR configuration" property not working v22.4.0 - PVR Add-on API v9.1.0 diff --git a/src/tvheadend/entity/Recording.h b/src/tvheadend/entity/Recording.h index 1b391cc4..1332b00a 100644 --- a/src/tvheadend/entity/Recording.h +++ b/src/tvheadend/entity/Recording.h @@ -58,8 +58,7 @@ class Recording : public RecordingBase m_contentType == other.m_contentType && m_season == other.m_season && m_episode == other.m_episode && m_part == other.m_part && m_ageRating == other.m_ageRating && m_ratingLabel == other.m_ratingLabel && - m_ratingIcon == other.m_ratingIcon && m_ratingSource == other.m_ratingSource && - m_configUuid == other.m_configUuid; + m_ratingIcon == other.m_ratingIcon && m_ratingSource == other.m_ratingSource; } bool operator!=(const Recording& other) { return !(*this == other); } @@ -186,9 +185,6 @@ class Recording : public RecordingBase const std::string& GetRatingSource() const { return m_ratingSource; } void SetRatingSource(const std::string& ratingSource) { m_ratingSource = ratingSource; } - const std::string& GetConfigUuid() const { return m_configUuid; } - void SetConfigUuid(const std::string& uuid) { m_configUuid = uuid; } - private: uint32_t m_channelType{0}; std::string m_channelName; @@ -219,7 +215,6 @@ class Recording : public RecordingBase std::string m_ratingLabel; std::string m_ratingIcon; std::string m_ratingSource; - std::string m_configUuid; // DVR configuration UUID. }; } // namespace tvheadend::entity