Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom prop logspam #683

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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