Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR autorec: another inconsistency fixes (missing or extra schedules)
  • Loading branch information
perexg committed Mar 2, 2016
1 parent 270a698 commit 52ed773
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/api/api_dvr.c
Expand Up @@ -382,8 +382,11 @@ api_dvr_autorec_create
if (cfg) {
htsmsg_set_str(conf, "config_name", idnode_uuid_as_str(&cfg->dvr_id, ubuf));
dae = dvr_autorec_create(NULL, conf);
if (dae)
if (dae) {
idnode_changed(&dae->dae_id);
dvr_autorec_changed(dae, 0);
dvr_autorec_completed(dae, 0);
}
}
pthread_mutex_unlock(&global_lock);

Expand Down
4 changes: 1 addition & 3 deletions src/dvr/dvr_autorec.c
Expand Up @@ -296,9 +296,6 @@ dvr_autorec_create(const char *uuid, htsmsg_t *conf)

idnode_load(&dae->dae_id, conf);

dvr_autorec_changed(dae, 1);
dvr_autorec_completed(dae, 0);

htsp_autorec_entry_add(dae);

return dae;
Expand Down Expand Up @@ -1313,6 +1310,7 @@ dvr_autorec_update(void)
dvr_autorec_entry_t *dae;
TAILQ_FOREACH(dae, &autorec_entries, dae_link) {
dvr_autorec_changed(dae, 0);
dvr_autorec_completed(dae, 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/dvr/dvr_db.c
Expand Up @@ -756,7 +756,7 @@ dvr_entry_create(const char *uuid, htsmsg_t *conf, int clone)
lang_str_get(de->de_title, NULL), DVR_CH_NAME(de),
(int64_t)de2->de_start, de->de_creator ?: "",
idnode_uuid_as_str(&de2->de_id, ubuf));
dvr_entry_destroy(de, 0);
dvr_entry_destroy(de, 1);
return NULL;
}
}
Expand Down

0 comments on commit 52ed773

Please sign in to comment.