fix: limit image sizes

This commit is contained in:
Fredrik Burmester
2024-08-22 13:27:22 +02:00
parent bbf926e752
commit 4cca6f0e8c
4 changed files with 9 additions and 6 deletions

View File

@@ -23,8 +23,8 @@ const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
getPrimaryImageUrl({
api,
item,
quality: 90,
width: 176 * 2,
quality: 80,
width: 300,
}),
[item]
);

View File

@@ -123,14 +123,16 @@ export const LargeMovieCarousel: React.FC<Props> = ({ ...props }) => {
const RenderItem: React.FC<{ item: BaseItemDto }> = ({ item }) => {
const [api] = useAtom(apiAtom);
const screenWidth = Dimensions.get("screen").width;
const uri = useMemo(() => {
if (!api) return null;
return getBackdropUrl({
api,
item,
quality: 90,
width: 1000,
quality: 70,
width: Math.floor(screenWidth * 0.8 * 2),
});
}, [api, item]);

View File

@@ -23,6 +23,7 @@ const MoviePoster: React.FC<MoviePosterProps> = ({
getPrimaryImageUrl({
api,
item,
width: 300,
}),
[item]
);

View File

@@ -15,8 +15,8 @@ import { isBaseItemDto } from "../jellyfin";
export const getPrimaryImageUrl = ({
api,
item,
quality = 90,
width = 500,
quality = 80,
width = 400,
}: {
api?: Api | null;
item?: BaseItemDto | BaseItemPerson | null;