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

Update with latest API changes

This commit is contained in:
ferferga 2020-05-27 19:24:51 +02:00
commit 456223c2b9
3 changed files with 8 additions and 5 deletions

View file

@ -506,7 +506,7 @@ import 'programStyles';
let imgTag = null; let imgTag = null;
let coverImage = false; let coverImage = false;
let uiAspect = null; let uiAspect = null;
let imgType; let imgType = null;
if (options.preferThumb && item.ImageTags && item.ImageTags.Thumb) { if (options.preferThumb && item.ImageTags && item.ImageTags.Thumb) {
imgType = 'Thumb'; imgType = 'Thumb';
@ -613,9 +613,11 @@ import 'programStyles';
}); });
} }
let blurHashes = options.imageBlurhashes || item.ImageBlurHashes || {};
return { return {
imgUrl: imgUrl, imgUrl: imgUrl,
blurhash: (item.ImageBlurHashes || {})[imgType], blurhash: (blurHashes[imgType] || {})[imgTag],
forceName: forceName, forceName: forceName,
coverImage: coverImage coverImage: coverImage
}; };

View file

@ -93,7 +93,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
itemId = item.ParentPrimaryImageItemId; itemId = item.ParentPrimaryImageItemId;
} }
return { url: apiClient.getScaledImageUrl(itemId, options) || null, blurHash: (item.ImageBlurHashes || {})[options.tag] || null}; return { url: apiClient.getScaledImageUrl(itemId, options), blurHash: (item.ImageBlurHashes || {})[options.type][options.tag]};
} }
function getChannelImageUrl(item, width) { function getChannelImageUrl(item, width) {
@ -108,7 +108,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
options.tag = item.ChannelPrimaryImageTag; options.tag = item.ChannelPrimaryImageTag;
} }
return { url: apiClient.getScaledImageUrl(item.ChannelId, options) || null, blurhash: (item.ImageBlurHashes || {})[options.tag] || null}; return { url: apiClient.getScaledImageUrl(item.ChannelId, options), blurhash: (item.ImageBlurHashes || {})[options.type][options.tag]};
} }
function getTextLinesHtml(textlines, isLargeStyle) { function getTextLinesHtml(textlines, isLargeStyle) {

View file

@ -1863,7 +1863,8 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
itemsContainer: castContent, itemsContainer: castContent,
coverImage: true, coverImage: true,
serverId: item.ServerId, serverId: item.ServerId,
shape: 'overflowPortrait' shape: 'overflowPortrait',
imageBlurhashes: item.ImageBlurHashes
}); });
}); });
} }