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

Merge pull request #5746 from thornbill/remove-deprecated-sdk-function

Remove usage of deprecated getItemImageUrl
This commit is contained in:
Bill Thornton 2024-07-02 10:46:14 -04:00 committed by GitHub
commit c4496e20ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,23 +138,23 @@ export function getChannelImageUrl(
let itemId;
const fillWidth = size;
const fillHeight = size;
const imgType = ImageType.Primary;
if (item.ChannelId && item.ChannelPrimaryImageTag) {
imgTag = item.ChannelPrimaryImageTag;
itemId = item.ChannelId;
}
if (api && imgTag && imgType && itemId) {
const response = api.getItemImageUrl(itemId, imgType, {
fillWidth: fillWidth,
fillHeight: fillHeight,
tag: imgTag
});
if (api && imgTag && itemId) {
const response = getImageApi(api)
.getItemImageUrlById(itemId, ImageType.Primary, {
fillWidth,
fillHeight,
tag: imgTag
});
return {
imgUrl: response,
blurhash: item.ImageBlurHashes?.[imgType]?.[imgTag]
blurhash: item.ImageBlurHashes?.[ImageType.Primary]?.[imgTag]
};
}