From: David Kalnischkies Date: Mon, 6 May 2024 15:08:57 +0000 (+0000) Subject: Avoid image container if there is no image X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b977b10cb9c110508af21009f6f017abb3769e0a;p=thirdparty%2Ftvheadend.git Avoid image container if there is no image --- diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index d12094fe1..12f412d18 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -97,13 +97,13 @@ tvheadend.dvrDetails = function(grid, index) { content += '
'; } // If we have no image then use fanart image instead. - content += '
'; - if (event.image != null && event.image.length > 0) { - content += ''; - } else if (event.fanart_image != null && event.fanart_image.length > 0) { - content += ''; - } - content += '
'; + var eventimg = ''; + if (event.image != null && event.image.length > 0) + eventimg = event.image; + else if (event.fanart_image != null && event.fanart_image.length > 0) + eventimg = event.fanart_image; + if (eventimg) + content += '
'; content += '
'; if (event.disp_summary && (!event.disp_subtitle || event.disp_subtitle != event.disp_summary))