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:
parent
a8069127ab
commit
94f65820a6
1 changed files with 8 additions and 8 deletions
|
@ -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]
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue