From 26708eff1fb675727de4a6233807f82fdced4ef3 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 30 Sep 2021 21:44:20 +0100 Subject: [PATCH] fall back to default preview ratio if item does not have videoRatio --- static/js/clipList.js | 1 + static/js/list.js | 1 + 2 files changed, 2 insertions(+) diff --git a/static/js/clipList.js b/static/js/clipList.js index e0c5ae8e..21b5af80 100644 --- a/static/js/clipList.js +++ b/static/js/clipList.js @@ -12,6 +12,7 @@ pandora.ui.clipList = function(videoRatio) { fixedRatio: fixedRatio, item: function(data, sort, size) { size = size || 128; // fixme: is this needed? + data.videoRatio = data.videoRatio || pandora.site.video.previewRatio; var ratio, width, height, format, info, sortKey, title, url; if (!ui.item) { diff --git a/static/js/list.js b/static/js/list.js index 1ad41d8b..bc680f85 100644 --- a/static/js/list.js +++ b/static/js/list.js @@ -181,6 +181,7 @@ pandora.ui.list = function() { id: 'list', item: function(data, sort, size) { size = 128; + data.videoRatio = data.videoRatio || pandora.site.video.previewRatio; var ratio = ui.icons == 'posters' ? (ui.showSitePosters ? pandora.site.posters.ratio : data.posterRatio) : 1, url = pandora.getMediaURL('/' + data.id + '/' + (