Skip to content

Commit

Permalink
Merge pull request #683 from ksooo/fix-custom-prop-logspam
Browse files Browse the repository at this point in the history
Fix custom prop logspam
  • Loading branch information
ksooo authored Sep 13, 2024
2 parents d03e546 + 709d03c commit dc8d521
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pvr.hts/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.hts"
version="22.4.0"
version="22.4.1"
name="Tvheadend HTSP Client"
provider-name="Adam Sutton, Sam Stenvall, Lars Op den Kamp, Kai Sommerfeld">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
4 changes: 4 additions & 0 deletions pvr.hts/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
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
- Add support for Autorec property "Broadcast type" (HTSPv39+)
Expand Down
17 changes: 10 additions & 7 deletions src/tvheadend/CustomTimerProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ std::vector<kodi::addon::PVRSettingKeyValuePair> CustomTimerProperties::GetPrope
{
std::vector<kodi::addon::PVRSettingKeyValuePair> customProps;
GetCommonProperties(customProps, rec);

if (customProps.size() < m_propIds.size())
Logger::Log(LogLevel::LEVEL_ERROR, "Not all properties handled!");

return customProps;
}

Expand All @@ -55,10 +59,13 @@ std::vector<kodi::addon::PVRSettingKeyValuePair> 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;
}

Expand All @@ -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;
}
}
Expand Down Expand Up @@ -189,7 +193,6 @@ const std::vector<kodi::addon::PVRTypeIntValue> CustomTimerProperties::GetPossib
// DVR configuration
if (m_conn.GetProtocol() >= 40)
{
// DVR configuration
std::vector<kodi::addon::PVRTypeIntValue> dvrConfigValues;
for (const auto& entry : m_dvrConfigs)
{
Expand Down
7 changes: 1 addition & 6 deletions src/tvheadend/entity/Recording.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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

0 comments on commit dc8d521

Please sign in to comment.