mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
fix: limit image sizes
This commit is contained in:
@@ -23,8 +23,8 @@ const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
|
||||
getPrimaryImageUrl({
|
||||
api,
|
||||
item,
|
||||
quality: 90,
|
||||
width: 176 * 2,
|
||||
quality: 80,
|
||||
width: 300,
|
||||
}),
|
||||
[item]
|
||||
);
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ const MoviePoster: React.FC<MoviePosterProps> = ({
|
||||
getPrimaryImageUrl({
|
||||
api,
|
||||
item,
|
||||
width: 300,
|
||||
}),
|
||||
[item]
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user