From 72cf7dd1cc696ded16ba2d4802d9167c119eeb77 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 1 Feb 2022 10:32:13 +0100 Subject: [PATCH 1/2] Fix deleted recordings not disappearing in Kodi until restart. --- src/Tvheadend.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp index 1a67dfd7..7cee09e1 100644 --- a/src/Tvheadend.cpp +++ b/src/Tvheadend.cpp @@ -2309,7 +2309,20 @@ void CTvheadend::ParseRecordingAddOrUpdate(htsmsg_t* msg, bool bAdd) /* Ignore recordings without a file (e.g. removed recordings) */ const char* error = htsmsg_get_str(msg, "error"); if (error && (strstr(error, "missing") != nullptr)) + { + const auto it = m_recordings.find(id); + if (it != m_recordings.end()) + { + m_recordings.erase(it); + + if (m_asyncState.GetState() > ASYNC_DVR) + { + TriggerTimerUpdate(); + TriggerRecordingUpdate(); + } + } return; + } /* Get/create entry */ Recording& rec = m_recordings[id]; From 14c7a3fe9dc8d6a9c7dc70708e3c07ae204e584f Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 1 Feb 2022 10:32:44 +0100 Subject: [PATCH 2/2] Add-on version update and changelog. --- pvr.hts/addon.xml.in | 2 +- pvr.hts/changelog.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pvr.hts/addon.xml.in b/pvr.hts/addon.xml.in index 8ea5c149..2d0b3456 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 58673658..372924ca 100644 --- a/pvr.hts/changelog.txt +++ b/pvr.hts/changelog.txt @@ -1,3 +1,6 @@ +v20.2.2 +- Fix deleted recordings not disappearing in Kodi until restart (regression introduced with v20.2.1) + v20.2.1 - Ignore recordings without a file (e.g. removed recordings). - When parsing recording add/update messages, always set the correct error string.