1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update latest

This commit is contained in:
Luke Pulverenti 2016-11-05 14:06:37 -04:00
parent 69b1b7e164
commit 30ad844e37

View file

@ -13,6 +13,10 @@
return browserInfo.mobile && AppInfo.enableAppLayouts; return browserInfo.mobile && AppInfo.enableAppLayouts;
} }
function getSquareShape() {
return enableScrollX() ? 'overflowSquare' : 'square';
}
function getThumbShape() { function getThumbShape() {
return enableScrollX() ? 'overflowBackdrop' : 'backdrop'; return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
} }
@ -281,18 +285,28 @@
var shape = viewType === 'movies' ? var shape = viewType === 'movies' ?
getPortraitShape() : getPortraitShape() :
viewType === 'music' ?
getSquareShape() :
getThumbShape(); getThumbShape();
var supportsImageAnalysis = appHost.supports('imageanalysis');
var cardLayout = supportsImageAnalysis && (viewType === 'music' || !viewType);
html += cardBuilder.getCardsHtml({ html += cardBuilder.getCardsHtml({
items: items, items: items,
shape: shape, shape: shape,
preferThumb: viewType != 'movies', preferThumb: viewType !== 'movies' && viewType !== 'music',
showUnplayedIndicator: false, showUnplayedIndicator: false,
showChildCountIndicator: true, showChildCountIndicator: true,
context: 'home', context: 'home',
centerText: true, overlayText: !cardLayout,
centerText: !cardLayout,
overlayPlayButton: viewType !== 'photos', overlayPlayButton: viewType !== 'photos',
allowBottomPadding: !enableScrollX() allowBottomPadding: !enableScrollX() && !cardLayout,
cardLayout: cardLayout,
showTitle: viewType === 'music' || !viewType,
showParentTitle: viewType === 'music' || !viewType,
vibrant: supportsImageAnalysis && cardLayout
}); });
html += '</div>'; html += '</div>';
} }
@ -479,7 +493,7 @@
overlayPlayButton: true, overlayPlayButton: true,
context: 'home', context: 'home',
centerText: true, centerText: true,
allowBottomPadding: !enableScrollX() allowBottomPadding: false
}); });
html += '</div>'; html += '</div>';
} }