Fix episodes listing after blurhash

This commit is contained in:
ferferga 2020-06-09 00:48:56 +02:00
parent 966ea7bb80
commit 13f472d7d5
2 changed files with 15 additions and 11 deletions

View File

@ -81,7 +81,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
options.tag = item.ImageTags.Primary;
itemId = item.Id;
}
if (!itemId) {
if (item.AlbumId && item.AlbumPrimaryImageTag) {
options.tag = item.AlbumPrimaryImageTag;
itemId = item.AlbumId;
@ -92,12 +92,15 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
options.tag = item.ParentPrimaryImageTag;
itemId = item.ParentPrimaryImageItemId;
}
}
let blurHashes = item.ImageBlurHashes || {};
let blurhashstr = (blurHashes[options.type] || {})[options.tag];
if (itemId) {
return { url: apiClient.getScaledImageUrl(itemId, options), blurhash: blurhashstr };
}
return null;
}
function getChannelImageUrl(item, width) {

View File

@ -1840,7 +1840,8 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
chaptercardbuilder.buildChapterCards(item, chapters, {
itemsContainer: scenesContent,
backdropShape: 'overflowBackdrop',
squareShape: 'overflowSquare'
squareShape: 'overflowSquare',
imageBlurhashes: item.ImageBlurHashes
});
});
} else {