Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adamsutton committed Sep 29, 2014
1 parent 4fb0774 commit 7048335
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dvr/dvr_autorec.c
Expand Up @@ -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
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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) {
Expand Down

1 comment on commit 7048335

@ksooo
Copy link
Contributor

@ksooo ksooo commented on 7048335 Sep 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Adam.

Please sign in to comment.