Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: log dvr entry delete operation
  • Loading branch information
perexg committed Oct 20, 2014
1 parent 4b63409 commit 956e8a0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/dvr/dvr_db.c
Expand Up @@ -1971,6 +1971,22 @@ dvr_val2pri(dvr_prio_t v)
void
dvr_entry_delete(dvr_entry_t *de)
{
time_t t;
struct tm tm;
char tbuf[64];

t = dvr_entry_get_start_time(de);
localtime_r(&t, &tm);
if (strftime(tbuf, sizeof(tbuf), "%F %T", &tm) <= 0)
*tbuf = 0;

tvhlog(LOG_INFO, "dvr", "delete entry %s \"%s\" on \"%s\" start time %s, "
"scheduled for recording by \"%s\", retention %d days",
idnode_uuid_as_str(&de->de_id),
lang_str_get(de->de_title, NULL), DVR_CH_NAME(de), tbuf,
de->de_creator ?: "",
dvr_entry_get_retention(de));

if(de->de_filename != NULL) {
#if ENABLE_INOTIFY
dvr_inotify_del(de);
Expand Down

0 comments on commit 956e8a0

Please sign in to comment.