feat(tvos): Add TopShelf Extension (#1561)

This commit is contained in:
Steve Byatt
2026-05-21 07:47:45 +01:00
committed by GitHub
parent 4bef386b82
commit 121ff0eea0
19 changed files with 832 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ import { apiAtom, userAtom } from "@/providers/JellyfinProvider";
import { useSettings } from "@/utils/atoms/settings";
import { getBackdropUrl } from "@/utils/jellyfin/image/getBackdropUrl";
import { scaleSize } from "@/utils/scaleSize";
import { updateTopShelfCache } from "@/utils/topshelf/cache";
const HORIZONTAL_PADDING = scaleSize(60);
const TOP_PADDING = scaleSize(100);
@@ -258,6 +259,18 @@ export const Home = () => {
refetchInterval: 60 * 1000,
});
useEffect(() => {
updateTopShelfCache({
api,
sections: [
{
title: t("home.continue_and_next_up"),
items: heroItems,
},
],
});
}, [api, heroItems, t]);
const userViews = useMemo(
() => data?.filter((l) => !settings?.hiddenLibraries?.includes(l.Id!)),
[data, settings?.hiddenLibraries],