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

Remove usage of deprecated getItemImageUrl

This commit is contained in:
Bill Thornton 2024-07-02 10:17:53 -04:00
parent a8069127ab
commit 94f65820a6

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]
};
}