Merge branch 'hotfix/limit-next-up'

This commit is contained in:
Fredrik Burmester
2024-08-22 13:28:13 +02:00
6 changed files with 11 additions and 7 deletions

View File

@@ -72,6 +72,7 @@ export default function index() {
await getTvShowsApi(api).getNextUp({ await getTvShowsApi(api).getNextUp({
userId: user?.Id, userId: user?.Id,
fields: ["MediaSourceCount"], fields: ["MediaSourceCount"],
limit: 20,
}) })
).data.Items) || ).data.Items) ||
[], [],

View File

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

View File

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

View File

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

View File

@@ -24,7 +24,7 @@ export const NextUp: React.FC<{ seriesId: string }> = ({ seriesId }) => {
userId: user?.Id, userId: user?.Id,
seriesId, seriesId,
fields: ["MediaSourceCount"], fields: ["MediaSourceCount"],
limit: 20, limit: 10,
}) })
).data.Items; ).data.Items;
}, },

View File

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