]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Need to delete files on complex scheduling when replacing timer after crash.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Tue, 9 Oct 2018 00:35:49 +0000 (01:35 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 19 Nov 2018 12:31:58 +0000 (13:31 +0100)
Scenario: Complex scheduling enabled. Recording ok, then crash and restart.

In this case, the recording is not currently running, so we can find a
better recording.  If there is a better recording later in the week,
that show will get preference (since complex recording states we don't
want a partial recording so prefer a later date for a full recording).

But, we used to destroy the dvr_entry, but this does not delete its
associated files so they would be left on disk as orphans/unreferenced
from any dvr/log file.

src/dvr/dvr_db.c

index c1d3da7cd4f9f68acdb51c1b5354d1f252fba531..e77df547ecc0bd8e56a4966abfb8fe5e205afe32 100644 (file)
@@ -2032,6 +2032,7 @@ dvr_entry_create_by_autorec(int enabled, epg_broadcast_t *e, dvr_autorec_entry_t
             gmtime2local(replace->de_bcast->start, t1buf, sizeof t1buf),
             e->channel ? channel_get_name(e->channel, channel_blank_name) : channel_blank_name,
             gmtime2local(e->start, t2buf, sizeof t2buf));
+    dvr_entry_delete(replace);
     dvr_entry_destroy(replace, 1);
   }