fix: Jellyseerr Recent Request slide fixes

- added src for backdrop + poster
- fixed horizontal height issues
This commit is contained in:
herrrta
2025-03-04 21:09:15 -05:00
parent ebcb414b89
commit 4dddc0f926
2 changed files with 13 additions and 16 deletions

View File

@@ -34,7 +34,7 @@ const RequestCard: React.FC<{request: MediaRequest}> = ({request}) => {
});
return (
!isLoading && details && <JellyseerrPoster horizontal showDownloadInfo item={details} mediaRequest={refreshedRequest} />
details && <JellyseerrPoster horizontal showDownloadInfo item={details} mediaRequest={refreshedRequest} />
)
}
@@ -50,9 +50,7 @@ const RecentRequestsSlide: React.FC<SlideProps & ViewProps> = ({ slide, ...props
});
return (
requests &&
requests.results.length > 0 &&
!isError && (
requests && (
<Slide
{...props}
slide={slide}

View File

@@ -33,15 +33,11 @@ const JellyseerrPoster: React.FC<Props> = ({
mediaRequest,
...props
}) => {
const { jellyseerrApi, getTitle, getYear, getMediaType, isJellyseerrResult } = useJellyseerr();
const { jellyseerrApi, getTitle, getYear, getMediaType } = useJellyseerr();
const loadingOpacity = useSharedValue(1);
const imageOpacity = useSharedValue(0);
const {t} = useTranslation();
const loadingAnimatedStyle = useAnimatedStyle(() => ({
opacity: loadingOpacity.value,
}));
const imageAnimatedStyle = useAnimatedStyle(() => ({
opacity: imageOpacity.value,
}));
@@ -51,11 +47,13 @@ const JellyseerrPoster: React.FC<Props> = ({
imageOpacity.value = withTiming(1, { duration: 300 });
};
const imageSrc = useMemo(
() => jellyseerrApi?.imageProxy(
horizontal ? item.backdropPath : item.posterPath,
horizontal ? "w1920_and_h800_multi_faces" : "w300_and_h450_face"
),
const backdropSrc = useMemo(
() => jellyseerrApi?.imageProxy(item.backdropPath, "w1920_and_h800_multi_faces"),
[item, jellyseerrApi, horizontal]
);
const posterSrc = useMemo(
() => jellyseerrApi?.imageProxy(item.posterPath, "w300_and_h450_face",),
[item, jellyseerrApi, horizontal]
);
@@ -116,16 +114,17 @@ const JellyseerrPoster: React.FC<Props> = ({
mediaTitle={title}
releaseYear={releaseYear}
canRequest={canRequest}
posterSrc={imageSrc!!}
posterSrc={posterSrc!!}
mediaType={mediaType}
>
<View className={`flex flex-col mr-2 h-auto`}>
<View className={`relative rounded-lg overflow-hidden border border-neutral-900 ${size} aspect-[${ratio}]`}>
<Animated.View style={imageAnimatedStyle}>
<Image
className="w-full"
key={item.id}
id={item.id.toString()}
source={{ uri: imageSrc }}
source={{ uri: horizontal ? backdropSrc : posterSrc }}
cachePolicy={"memory-disk"}
contentFit="cover"
style={{