Skip to content

Commit

Permalink
Merge pull request #576 from ksooo/fix-deleted-recordings-nexus
Browse files Browse the repository at this point in the history
Fix deleted recordings
  • Loading branch information
ksooo authored Feb 1, 2022
2 parents 5cf998e + 14c7a3f commit 5486bce
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
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="20.2.1"
version="20.2.2"
name="Tvheadend HTSP Client"
provider-name="Adam Sutton, Sam Stenvall, Lars Op den Kamp, Kai Sommerfeld">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.hts/changelog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
13 changes: 13 additions & 0 deletions src/Tvheadend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 5486bce

Please sign in to comment.