Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: allow to change stop time and stop_extra when the recording is a…
…ctive
  • Loading branch information
perexg committed May 5, 2015
1 parent f2b9b78 commit 22392fa
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/dvr/dvr_db.c
Expand Up @@ -893,8 +893,21 @@ static dvr_entry_t *_dvr_entry_update
char buf[40];
int save = 0;

if (!dvr_entry_is_editable(de))
return de;
if (!dvr_entry_is_editable(de)) {
if (stop < dispatch_clock)
stop = dispatch_clock;
if (stop < de->de_start)
stop = de->de_start;
if (stop != de->de_stop) {
de->de_stop = stop;
save = 1;
}
if (stop_extra && (stop_extra != de->de_stop_extra)) {
de->de_stop_extra = stop_extra;
save = 1;
}
goto dosave;
}

/* Start/Stop */
if (e) {
Expand Down Expand Up @@ -976,6 +989,7 @@ static dvr_entry_t *_dvr_entry_update
}

/* Save changes */
dosave:
if (save) {
idnode_changed(&de->de_id);
htsp_dvr_entry_update(de);
Expand Down

0 comments on commit 22392fa

Please sign in to comment.