diff --git a/webui/static/video/video-get-modal.js b/webui/static/video/video-get-modal.js index e21fd3b4..38dbf04b 100644 --- a/webui/static/video/video-get-modal.js +++ b/webui/static/video/video-get-modal.js @@ -20,6 +20,15 @@ function toast(msg, type) { if (typeof showToast === 'function') showToast(msg, type); } // A stable per-title hue so each modal glows in its own colour (the "vibe"). function hueOf(s) { var h = 0, t = String(s || ''); for (var i = 0; i < t.length; i++) h = (h * 31 + t.charCodeAt(i)) >>> 0; return h % 360; } + function resLabel(res) { + if (!res) return ''; + res = String(res).toLowerCase(); + if (res.indexOf('2160') > -1 || res === '4k') return '4K'; + if (res.indexOf('1080') > -1) return '1080p'; + if (res.indexOf('720') > -1) return '720p'; + if (res.indexOf('480') > -1 || res.indexOf('576') > -1) return 'SD'; + return res.toUpperCase(); + } // A show is "airing" (eye) unless its status says it's finished (get-symbol). function isAiring(status) { @@ -84,6 +93,7 @@ '' + '
Loading details…
' + + '' + + '' + '' + '' + '