fix isClipsQuery check

This commit is contained in:
j 2024-09-16 20:51:37 +01:00
parent d5ace7aeca
commit 7cc1504069

View file

@ -270,7 +270,7 @@ pandora.ui.list = function() {
item: function(data, sort, size) { item: function(data, sort, size) {
size = 128; size = 128;
var clipsQuery = pandora.getClipsQuery(), var clipsQuery = pandora.getClipsQuery(),
isClipsQuery = !!clipsQuery.conditions.length, isClipsQuery = clipsQuery.conditions.length > 1,
ratio = ui.icons == 'posters' 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 + '/' + (
@ -352,7 +352,7 @@ pandora.ui.list = function() {
}, },
items: function(data, callback) { items: function(data, callback) {
var clipsQuery = pandora.getClipsQuery(), var clipsQuery = pandora.getClipsQuery(),
isClipsQuery = !!clipsQuery.conditions.length; isClipsQuery = clipsQuery.conditions.length > 1;
pandora.api.find(Ox.extend(data, Ox.extend({ pandora.api.find(Ox.extend(data, Ox.extend({
query: ui.find query: ui.find
}, isClipsQuery ? {clips: { }, isClipsQuery ? {clips: {