fall back to default preview ratio if item does not have videoRatio

This commit is contained in:
j 2021-09-30 21:44:20 +01:00
parent fd318ef706
commit 26708eff1f
2 changed files with 2 additions and 0 deletions

View file

@ -12,6 +12,7 @@ pandora.ui.clipList = function(videoRatio) {
fixedRatio: fixedRatio, fixedRatio: fixedRatio,
item: function(data, sort, size) { item: function(data, sort, size) {
size = size || 128; // fixme: is this needed? size = size || 128; // fixme: is this needed?
data.videoRatio = data.videoRatio || pandora.site.video.previewRatio;
var ratio, width, height, var ratio, width, height,
format, info, sortKey, title, url; format, info, sortKey, title, url;
if (!ui.item) { if (!ui.item) {

View file

@ -181,6 +181,7 @@ pandora.ui.list = function() {
id: 'list', id: 'list',
item: function(data, sort, size) { item: function(data, sort, size) {
size = 128; size = 128;
data.videoRatio = data.videoRatio || pandora.site.video.previewRatio;
var ratio = ui.icons == 'posters' var ratio = ui.icons == 'posters'
? (ui.showSitePosters ? pandora.site.posters.ratio : data.posterRatio) : 1, ? (ui.showSitePosters ? pandora.site.posters.ratio : data.posterRatio) : 1,
url = pandora.getMediaURL('/' + data.id + '/' + ( url = pandora.getMediaURL('/' + data.id + '/' + (