mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-22 06:46:46 +01:00
feat(tvos): Add TopShelf Extension (#1561)
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user