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

Replace deprecated getItemImageUrl with imageUrlsApi.getItemImageUrlById

This commit is contained in:
grafixeyehero 2024-02-01 19:41:08 +03:00
parent 876fbee53e
commit ed46ee5254
4 changed files with 28 additions and 31 deletions

View file

@ -1,5 +1,6 @@
import { Api } from '@jellyfin/sdk';
import { BaseItemKind, ImageType } from '@jellyfin/sdk/lib/generated-client';
import { getImageApi } from '@jellyfin/sdk/lib/utils/api/image-api';
import globalize from 'scripts/globalize';
import type { ItemDto } from 'types/itemDto';
@ -110,7 +111,7 @@ export function getImageUrl(
}
if (api && imgTag && imgType && itemId) {
const response = api.getItemImageUrl(itemId, imgType, {
const response = getImageApi(api).getItemImageUrlById(itemId, imgType, {
fillWidth: fillWidth,
fillHeight: fillHeight,
tag: imgTag