fix: refactor

This commit is contained in:
Fredrik Burmester
2024-08-17 13:14:59 +02:00
parent 26050f7179
commit 6bfc0c72d1
9 changed files with 59 additions and 57 deletions

View File

@@ -11,9 +11,11 @@ import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
export const getLogoImageUrlById = ({
api,
item,
height = 130,
}: {
api?: Api | null;
item?: BaseItemDto | null;
height?: number;
}) => {
if (!api || !item) {
return null;
@@ -27,7 +29,7 @@ export const getLogoImageUrlById = ({
params.append("tag", imageTags);
params.append("quality", "90");
params.append("fillHeight", "130");
params.append("fillHeight", height.toString());
return `${api.basePath}/Items/${item.Id}/Images/Logo?${params.toString()}`;
};