Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR WEBUI: add and update filesize in upcoming/current recordings
  • Loading branch information
perexg committed Feb 1, 2015
1 parent 4b05735 commit facee6f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/dvr/dvr_db.c
Expand Up @@ -1555,7 +1555,8 @@ dvr_entry_class_url_get(void *o)
static const char *s;
static char buf[100];
s = "";
if (de->de_sched_state == DVR_COMPLETED) {
if (de->de_sched_state == DVR_COMPLETED ||
de->de_sched_state == DVR_RECORDING) {
snprintf(buf, sizeof(buf), "dvrfile/%s", idnode_uuid_as_str(&de->de_id));
s = buf;
}
Expand All @@ -1567,9 +1568,12 @@ dvr_entry_class_filesize_get(void *o)
{
static int64_t size;
dvr_entry_t *de = (dvr_entry_t *)o;
if (de->de_sched_state == DVR_COMPLETED)
if (de->de_sched_state == DVR_COMPLETED ||
de->de_sched_state == DVR_RECORDING) {
size = dvr_get_filesize(de);
else
if (size < 0)
size = 0;
} else
size = 0;
return &size;
}
Expand Down
7 changes: 6 additions & 1 deletion src/webui/static/app/dvr.js
Expand Up @@ -215,8 +215,13 @@ tvheadend.dvr_upcoming = function(panel, index) {
},
del: true,
list: 'disp_title,episode,pri,start_real,stop_real,' +
'duration,channel,owner,creator,config_name,' +
'duration,filesize,channel,owner,creator,config_name,' +
'sched_status,errors,data_errors,comment',
columns: {
filesize: {
renderer: tvheadend.filesizeRenderer()
}
},
sort: {
field: 'start_real',
direction: 'ASC'
Expand Down

0 comments on commit facee6f

Please sign in to comment.