diff --git a/pvr.hts/addon.xml.in b/pvr.hts/addon.xml.in index 7ed9d5f2..f9195782 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. 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];