mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Use parent poster for items with children
This commit is contained in:
parent
bef977062e
commit
efabfc6f69
@ -368,9 +368,7 @@ import 'programStyles';
|
|||||||
let apiClient;
|
let apiClient;
|
||||||
let lastServerId;
|
let lastServerId;
|
||||||
|
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (const [i, item] of items.entries()) {
|
||||||
|
|
||||||
let item = items[i];
|
|
||||||
let serverId = item.ServerId || options.serverId;
|
let serverId = item.ServerId || options.serverId;
|
||||||
|
|
||||||
if (serverId !== lastServerId) {
|
if (serverId !== lastServerId) {
|
||||||
@ -541,7 +539,7 @@ import 'programStyles';
|
|||||||
imgType = 'Backdrop';
|
imgType = 'Backdrop';
|
||||||
imgTag = item.ParentBackdropImageTags[0];
|
imgTag = item.ParentBackdropImageTags[0];
|
||||||
itemId = item.ParentBackdropItemId;
|
itemId = item.ParentBackdropItemId;
|
||||||
} else if (item.ImageTags && item.ImageTags.Primary) {
|
} else if (item.ImageTags && item.ImageTags.Primary && (item.Type !== 'Episode' || item.ChildCount !== 0)) {
|
||||||
imgType = 'Primary';
|
imgType = 'Primary';
|
||||||
imgTag = item.ImageTags.Primary;
|
imgTag = item.ImageTags.Primary;
|
||||||
height = width && primaryImageAspectRatio ? Math.round(width / primaryImageAspectRatio) : null;
|
height = width && primaryImageAspectRatio ? Math.round(width / primaryImageAspectRatio) : null;
|
||||||
@ -556,7 +554,10 @@ import 'programStyles';
|
|||||||
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (item.SeriesPrimaryImageTag) {
|
||||||
|
imgType = 'Primary';
|
||||||
|
imgTag = item.SeriesPrimaryImageTag;
|
||||||
|
itemId = item.SeriesId;
|
||||||
} else if (item.PrimaryImageTag) {
|
} else if (item.PrimaryImageTag) {
|
||||||
imgType = 'Primary';
|
imgType = 'Primary';
|
||||||
imgTag = item.PrimaryImageTag;
|
imgTag = item.PrimaryImageTag;
|
||||||
@ -577,10 +578,6 @@ import 'programStyles';
|
|||||||
imgType = 'Primary';
|
imgType = 'Primary';
|
||||||
imgTag = item.ParentPrimaryImageTag;
|
imgTag = item.ParentPrimaryImageTag;
|
||||||
itemId = item.ParentPrimaryImageItemId;
|
itemId = item.ParentPrimaryImageItemId;
|
||||||
} else if (item.SeriesPrimaryImageTag) {
|
|
||||||
imgType = 'Primary';
|
|
||||||
imgTag = item.SeriesPrimaryImageTag;
|
|
||||||
itemId = item.SeriesId;
|
|
||||||
} else if (item.AlbumId && item.AlbumPrimaryImageTag) {
|
} else if (item.AlbumId && item.AlbumPrimaryImageTag) {
|
||||||
imgType = 'Primary';
|
imgType = 'Primary';
|
||||||
imgTag = item.AlbumPrimaryImageTag;
|
imgTag = item.AlbumPrimaryImageTag;
|
||||||
|
@ -254,7 +254,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||||||
return cardBuilder.getCardsHtml({
|
return cardBuilder.getCardsHtml({
|
||||||
items: items,
|
items: items,
|
||||||
shape: shape,
|
shape: shape,
|
||||||
preferThumb: viewType !== 'movies' && itemType !== 'Channel' && viewType !== 'music' ? 'auto' : null,
|
preferThumb: viewType !== 'movies' && viewType !== 'tvshows' && itemType !== 'Channel' && viewType !== 'music' ? 'auto' : null,
|
||||||
showUnplayedIndicator: false,
|
showUnplayedIndicator: false,
|
||||||
showChildCountIndicator: true,
|
showChildCountIndicator: true,
|
||||||
context: 'home',
|
context: 'home',
|
||||||
|
Loading…
Reference in New Issue
Block a user