dvr autorec: don't delete spawned recordings on shutdown
This stops the odd behaviour of alerting the user to new recordings that are added on startup, that were previously in existance on shutdown.
This commit is contained in:
parent
4fb0774fa2
commit
7048335632
1 changed files with 4 additions and 3 deletions
|
@ -43,13 +43,14 @@ struct dvr_autorec_entry_queue autorec_entries;
|
|||
* Unlink - and remove any unstarted
|
||||
*/
|
||||
static void
|
||||
dvr_autorec_purge_spawns(dvr_autorec_entry_t *dae)
|
||||
dvr_autorec_purge_spawns(dvr_autorec_entry_t *dae, int del)
|
||||
{
|
||||
dvr_entry_t *de;
|
||||
|
||||
while((de = LIST_FIRST(&dae->dae_spawns)) != NULL) {
|
||||
LIST_REMOVE(de, de_autorec_link);
|
||||
de->de_autorec = NULL;
|
||||
if (!del) continue;
|
||||
if (de->de_sched_state == DVR_SCHEDULED)
|
||||
dvr_entry_cancel(de);
|
||||
else
|
||||
|
@ -273,7 +274,7 @@ dvr_autorec_add_series_link(const char *dvr_config_name,
|
|||
static void
|
||||
autorec_entry_destroy(dvr_autorec_entry_t *dae, int delconf)
|
||||
{
|
||||
dvr_autorec_purge_spawns(dae);
|
||||
dvr_autorec_purge_spawns(dae, delconf);
|
||||
|
||||
if (delconf)
|
||||
hts_settings_remove("dvr/autorec/%s", idnode_uuid_as_str(&dae->dae_id));
|
||||
|
@ -1044,7 +1045,7 @@ dvr_autorec_changed(dvr_autorec_entry_t *dae, int purge)
|
|||
epg_broadcast_t *e;
|
||||
|
||||
if (purge)
|
||||
dvr_autorec_purge_spawns(dae);
|
||||
dvr_autorec_purge_spawns(dae, 1);
|
||||
|
||||
CHANNEL_FOREACH(ch) {
|
||||
RB_FOREACH(e, &ch->ch_epg_schedule, sched_link) {
|
||||
|
|
Loading…
Add table
Reference in a new issue