diff --git a/pvr.hts/addon.xml.in b/pvr.hts/addon.xml.in index e7554cc3..78e47e26 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 72e4b8d1..c7ded3c3 100644 --- a/pvr.hts/changelog.txt +++ b/pvr.hts/changelog.txt @@ -1,3 +1,10 @@ +v19.0.5 +- Translations updates from Weblate + - pl_pl +- Ignore recordings without a file (e.g. removed recordings). +- When parsing recording add/update messages, always set the correct error string. +- Reduce debug log spam. Do not log recording descriptions. + v19.0.4 - Translations updates from Weblate - es_mx diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp index ad27581e..37460047 100644 --- a/src/Tvheadend.cpp +++ b/src/Tvheadend.cpp @@ -2299,6 +2299,11 @@ void CTvheadend::ParseRecordingAddOrUpdate(htsmsg_t* msg, bool bAdd) !htsmsg_get_u32(msg, "duplicate", &dup) && dup == 1) return; + /* Ignore recordings without a file (e.g. removed recordings) */ + const char* error = htsmsg_get_str(msg, "error"); + if (error && (strstr(error, "missing") != nullptr)) + return; + /* Get/create entry */ Recording& rec = m_recordings[id]; Recording comparison = rec; @@ -2588,15 +2593,12 @@ void CTvheadend::ParseRecordingAddOrUpdate(htsmsg_t* msg, bool bAdd) } /* Error */ - str = htsmsg_get_str(msg, "error"); - if (str) + if (error) { - if (!std::strcmp(str, "300")) + if (!std::strcmp(error, "300")) rec.SetState(PVR_TIMER_STATE_ABORTED); - else if (strstr(str, "missing") != nullptr) - rec.SetState(PVR_TIMER_STATE_ERROR); - else - rec.SetError(str); + + rec.SetError(error); } /* A running recording will have an active subscription assigned to it */ @@ -2641,11 +2643,10 @@ void CTvheadend::ParseRecordingAddOrUpdate(htsmsg_t* msg, bool bAdd) /* Update */ if (rec != comparison) { - std::string error = rec.GetError().empty() ? "none" : rec.GetError(); + const std::string error = rec.GetError().empty() ? "n/a" : rec.GetError(); - Logger::Log(LogLevel::LEVEL_DEBUG, "recording id:%d, state:%s, title:%s, desc:%s, error:%s", - rec.GetId(), state, rec.GetTitle().c_str(), rec.GetDescription().c_str(), - error.c_str()); + Logger::Log(LogLevel::LEVEL_DEBUG, "recording id:%d, state:%s, title:%s, error:%s", + rec.GetId(), state, rec.GetTitle().c_str(), error.c_str()); if (m_asyncState.GetState() > ASYNC_DVR) {