Skip to content

Commit dc8d521

Browse files
authored
Merge pull request #683 from ksooo/fix-custom-prop-logspam
Fix custom prop logspam
2 parents d03e546 + 709d03c commit dc8d521

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

pvr.hts/addon.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<addon
33
id="pvr.hts"
4-
version="22.4.0"
4+
version="22.4.1"
55
name="Tvheadend HTSP Client"
66
provider-name="Adam Sutton, Sam Stenvall, Lars Op den Kamp, Kai Sommerfeld">
77
<requires>@ADDON_DEPENDS@</requires>

pvr.hts/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v22.4.1
2+
- Fix pointless "Unknown property" log spam introduced with v22.4.0
3+
- Fix update of "DVR configuration" property not working
4+
15
v22.4.0
26
- PVR Add-on API v9.1.0
37
- Add support for Autorec property "Broadcast type" (HTSPv39+)

src/tvheadend/CustomTimerProperties.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ std::vector<kodi::addon::PVRSettingKeyValuePair> CustomTimerProperties::GetPrope
3333
{
3434
std::vector<kodi::addon::PVRSettingKeyValuePair> customProps;
3535
GetCommonProperties(customProps, rec);
36+
37+
if (customProps.size() < m_propIds.size())
38+
Logger::Log(LogLevel::LEVEL_ERROR, "Not all properties handled!");
39+
3640
return customProps;
3741
}
3842

@@ -55,10 +59,13 @@ std::vector<kodi::addon::PVRSettingKeyValuePair> CustomTimerProperties::GetPrope
5559
break;
5660
}
5761
default:
58-
Logger::Log(LogLevel::LEVEL_ERROR, "Unknown property %u", propId);
5962
break;
6063
}
6164
}
65+
66+
if (customProps.size() < m_propIds.size())
67+
Logger::Log(LogLevel::LEVEL_ERROR, "Not all properties handled!");
68+
6269
return customProps;
6370
}
6471

@@ -85,14 +92,11 @@ void CustomTimerProperties::GetCommonProperties(
8592
{
8693
// User comment
8794
if (m_conn.GetProtocol() >= 42)
88-
{
89-
/* user comment */
9095
props.emplace_back(CUSTOM_PROP_ID_DVR_COMMENT, rec.GetComment());
91-
break;
92-
}
96+
97+
break;
9398
}
9499
default:
95-
Logger::Log(LogLevel::LEVEL_ERROR, "Unknown property %u", propId);
96100
break;
97101
}
98102
}
@@ -189,7 +193,6 @@ const std::vector<kodi::addon::PVRTypeIntValue> CustomTimerProperties::GetPossib
189193
// DVR configuration
190194
if (m_conn.GetProtocol() >= 40)
191195
{
192-
// DVR configuration
193196
std::vector<kodi::addon::PVRTypeIntValue> dvrConfigValues;
194197
for (const auto& entry : m_dvrConfigs)
195198
{

src/tvheadend/entity/Recording.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class Recording : public RecordingBase
5858
m_contentType == other.m_contentType && m_season == other.m_season &&
5959
m_episode == other.m_episode && m_part == other.m_part &&
6060
m_ageRating == other.m_ageRating && m_ratingLabel == other.m_ratingLabel &&
61-
m_ratingIcon == other.m_ratingIcon && m_ratingSource == other.m_ratingSource &&
62-
m_configUuid == other.m_configUuid;
61+
m_ratingIcon == other.m_ratingIcon && m_ratingSource == other.m_ratingSource;
6362
}
6463

6564
bool operator!=(const Recording& other) { return !(*this == other); }
@@ -186,9 +185,6 @@ class Recording : public RecordingBase
186185
const std::string& GetRatingSource() const { return m_ratingSource; }
187186
void SetRatingSource(const std::string& ratingSource) { m_ratingSource = ratingSource; }
188187

189-
const std::string& GetConfigUuid() const { return m_configUuid; }
190-
void SetConfigUuid(const std::string& uuid) { m_configUuid = uuid; }
191-
192188
private:
193189
uint32_t m_channelType{0};
194190
std::string m_channelName;
@@ -219,7 +215,6 @@ class Recording : public RecordingBase
219215
std::string m_ratingLabel;
220216
std::string m_ratingIcon;
221217
std::string m_ratingSource;
222-
std::string m_configUuid; // DVR configuration UUID.
223218
};
224219

225220
} // namespace tvheadend::entity

0 commit comments

Comments
 (0)