mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added a virtual season image provider
This commit is contained in:
parent
9b7f81c3c6
commit
3360897d0a
6 changed files with 52 additions and 56 deletions
|
@ -667,7 +667,24 @@
|
|||
|
||||
var html = "";
|
||||
|
||||
var primaryImageAspectRatio = options.useAverageAspectRatio ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null;
|
||||
var primaryImageAspectRatio = options.useAverageAspectRatio || options.shape == 'auto' ? LibraryBrowser.getAveragePrimaryImageAspectRatio(items) : null;
|
||||
|
||||
if (options.shape == 'auto') {
|
||||
|
||||
if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) {
|
||||
options.shape = 'backdrop';
|
||||
}
|
||||
else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .3) {
|
||||
options.shape = 'square';
|
||||
}
|
||||
else {
|
||||
options.shape = 'portrait';
|
||||
}
|
||||
}
|
||||
|
||||
if (!options.useAverageAspectRatio) {
|
||||
primaryImageAspectRatio = null;
|
||||
}
|
||||
|
||||
for (var i = 0, length = items.length; i < length; i++) {
|
||||
|
||||
|
@ -938,7 +955,7 @@
|
|||
if (options.showParentTitle) {
|
||||
|
||||
html += "<div class='" + cssclass + "'>";
|
||||
html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || " ");
|
||||
html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || " ");
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue