From 31b47ffe004c7a490979beb8a00e1944c4dc028b Mon Sep 17 00:00:00 2001 From: ProfYaffle Date: Sun, 21 Dec 2014 13:08:17 +0000 Subject: [PATCH] WebUI: Add error checking to information dialog in Recording grid --- src/webui/static/app/dvr.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index 8242eb74..a828a23a 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -25,15 +25,23 @@ tvheadend.dvrDetails = function(uuid) { if (chicon != null && chicon.length > 0) content += ''; - content += '
' + title + '
'; - content += '
' + episode + '
'; - content += '
Scheduled Start Time:
' + tvheadend.niceDate(start_real * 1000) + '
'; - content += '
Scheduled Stop Time:
' + tvheadend.niceDate(stop_real * 1000) + '
'; - content += '
Duration:
' + parseInt(duration / 60) + ' min
'; - content += '
' + desc + '
'; + if (title) + content += '
' + title + '
'; + if (episode) + content += '
' + episode + '
'; + if (start_real) + content += '
Scheduled Start Time:
' + tvheadend.niceDate(start_real * 1000) + '
'; + if (stop_real) + content += '
Scheduled Stop Time:
' + tvheadend.niceDate(stop_real * 1000) + '
'; + if (duration) + content += '
Duration:
' + parseInt(duration / 60) + ' min
'; + if (desc) + content += '
' + desc + '
'; content += '
'; - content += '
Status:
' + status + '
'; - content += '
File size:
' + parseInt(filesize / 1000000) + ' MB
'; + if (status) + content += '
Status:
' + status + '
'; + if (filesize) + content += '
File size:
' + parseInt(filesize / 1000000) + ' MB
'; if (comment) content += '
Comment:
' + comment + '
';