Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: add DVR_RS_FINISHED state to distinguish finished recordings
  • Loading branch information
perexg committed Nov 6, 2015
1 parent 66cfc13 commit a6b3f95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/dvr/dvr.h
Expand Up @@ -113,6 +113,7 @@ typedef enum {
DVR_RS_COMMERCIAL,
DVR_RS_ERROR,
DVR_RS_EPG_WAIT,
DVR_RS_FINISHED
} dvr_rs_state_t;


Expand Down
8 changes: 5 additions & 3 deletions src/dvr/dvr_db.c
Expand Up @@ -369,7 +369,7 @@ dvr_entry_retention_timer(dvr_entry_t *de)
static void
dvr_entry_nostate(dvr_entry_t *de, int error_code)
{
dvr_entry_set_state(de, DVR_NOSTATE, DVR_RS_PENDING, error_code);
dvr_entry_set_state(de, DVR_NOSTATE, DVR_RS_FINISHED, error_code);
dvr_entry_retention_timer(de);
}

Expand All @@ -381,7 +381,7 @@ dvr_entry_missed_time(dvr_entry_t *de, int error_code)
{
dvr_autorec_entry_t *dae = de->de_autorec;

dvr_entry_set_state(de, DVR_MISSED_TIME, DVR_RS_PENDING, error_code);
dvr_entry_set_state(de, DVR_MISSED_TIME, DVR_RS_FINISHED, error_code);
dvr_entry_retention_timer(de);

// Trigger autorec update in case of max schedules limit
Expand All @@ -395,7 +395,7 @@ dvr_entry_missed_time(dvr_entry_t *de, int error_code)
static void
dvr_entry_completed(dvr_entry_t *de, int error_code)
{
dvr_entry_set_state(de, DVR_COMPLETED, DVR_RS_PENDING, error_code);
dvr_entry_set_state(de, DVR_COMPLETED, DVR_RS_FINISHED, error_code);
#if ENABLE_INOTIFY
dvr_inotify_add(de);
#endif
Expand Down Expand Up @@ -429,6 +429,8 @@ dvr_entry_status(dvr_entry_t *de)
return streaming_code2txt(de->de_last_error);
case DVR_RS_EPG_WAIT:
return N_("Waiting for EPG running flag");
case DVR_RS_FINISHED:
return N_("Finished");
default:
return N_("Invalid");
}
Expand Down

0 comments on commit a6b3f95

Please sign in to comment.