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;
|
let itemId;
|
||||||
const fillWidth = size;
|
const fillWidth = size;
|
||||||
const fillHeight = size;
|
const fillHeight = size;
|
||||||
const imgType = ImageType.Primary;
|
|
||||||
|
|
||||||
if (item.ChannelId && item.ChannelPrimaryImageTag) {
|
if (item.ChannelId && item.ChannelPrimaryImageTag) {
|
||||||
imgTag = item.ChannelPrimaryImageTag;
|
imgTag = item.ChannelPrimaryImageTag;
|
||||||
itemId = item.ChannelId;
|
itemId = item.ChannelId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (api && imgTag && imgType && itemId) {
|
if (api && imgTag && itemId) {
|
||||||
const response = api.getItemImageUrl(itemId, imgType, {
|
const response = getImageApi(api)
|
||||||
fillWidth: fillWidth,
|
.getItemImageUrlById(itemId, ImageType.Primary, {
|
||||||
fillHeight: fillHeight,
|
fillWidth,
|
||||||
tag: imgTag
|
fillHeight,
|
||||||
});
|
tag: imgTag
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
imgUrl: response,
|
imgUrl: response,
|
||||||
blurhash: item.ImageBlurHashes?.[imgType]?.[imgTag]
|
blurhash: item.ImageBlurHashes?.[ImageType.Primary]?.[imgTag]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue