diff --git a/README.md b/README.md index c1abe08e..533dd65f 100644 --- a/README.md +++ b/README.md @@ -32,22 +32,17 @@ Downloading works by using ffmpeg to convert an HLS stream into a video file on Chromecast support is still in development, and we're working on improving it. Currently, it supports casting videos and audio, but we're working on adding support for subtitles and other features. -## Plugins +### Streamyfin Plugin -In Streamyfin we have built-in support for a few plugins. These plugins are not required to use Streamyfin, but they add some extra functionality. +The Jellyfin Plugin for Streamyfin is a plugin you install into Jellyfin that hold all settings for the client Streamyfin. This allows you to syncronize settings accross all your users, like: -### Collection rows +- Auto log in to Jellyseerr without the user having to do anythin +- Choose the default languages +- Set download method and search provider +- Customize homescreen +- And more... -Jellyfin collections can be shown as rows or carousel on the home screen. -The following tags can be added to a collection to provide this functionality. - -Available tags: - -- sf_promoted: will make the collection a row at home -- sf_carousel: will make the collection a carousel on home. - -A plugin exists to create collections based on external sources like mdblist. This make the automatic process of managing collections such as trending, most watched, etc. -See [Collection Import Plugin](https://github.com/lostb1t/jellyfin-plugin-collection-import) for more info. +[Streamyfin Plugin](https://github.com/streamyfin/jellyfin-plugin-streamyfin) ### Jellysearch diff --git a/app/(auth)/(tabs)/(home)/index.tsx b/app/(auth)/(tabs)/(home)/index.tsx index f2f69853..f94393e7 100644 --- a/app/(auth)/(tabs)/(home)/index.tsx +++ b/app/(auth)/(tabs)/(home)/index.tsx @@ -308,10 +308,10 @@ export default function index() { const section = settings.home?.sections[key]; ss.push({ title: key, - queryKey: ["home", key, user?.Id], - queryFn: async () => - ( - await getItemsApi(api).getItems({ + queryKey: ["home", key], + queryFn: async () => { + if (section.items) { + const response = await getItemsApi(api).getItems({ userId: user?.Id, limit: section.items?.limit || 25, recursive: true, @@ -320,8 +320,21 @@ export default function index() { sortOrder: section.items?.sortOrder, filters: section.items?.filters, parentId: section.items?.parentId, - }) - ).data.Items || [], + }); + return response.data.Items || []; + } else if (section.nextUp) { + const response = await getTvShowsApi(api).getNextUp({ + userId: user?.Id, + fields: ["MediaSourceCount"], + limit: section.items?.limit || 25, + enableImageTypes: ["Primary", "Backdrop", "Thumb"], + enableResumable: section.items?.enableResumable || false, + enableRewatching: section.items?.enableRewatching || false, + }); + return response.data.Items || []; + } + return []; + }, type: "ScrollingCollectionList", orientation: section?.orientation || "vertical", }); diff --git a/components/ContinueWatchingPoster.tsx b/components/ContinueWatchingPoster.tsx index eb000d45..a011d23e 100644 --- a/components/ContinueWatchingPoster.tsx +++ b/components/ContinueWatchingPoster.tsx @@ -49,6 +49,11 @@ const ContinueWatchingPoster: React.FC = ({ else return `${api?.basePath}/Items/${item.Id}/Images/Primary?fillHeight=389&quality=80`; } + + if (item.ImageTags?.["Thumb"]) + return `${api?.basePath}/Items/${item.Id}/Images/Thumb?fillHeight=389&quality=80&tag=${item.ImageTags?.["Thumb"]}`; + else + return `${api?.basePath}/Items/${item.Id}/Images/Primary?fillHeight=389&quality=80`; }, [item]); const progress = useMemo(() => { diff --git a/components/home/ScrollingCollectionList.tsx b/components/home/ScrollingCollectionList.tsx index 17b4ec77..48c4c234 100644 --- a/components/home/ScrollingCollectionList.tsx +++ b/components/home/ScrollingCollectionList.tsx @@ -104,7 +104,12 @@ export const ScrollingCollectionList: React.FC = ({ {item.Type === "Movie" && orientation === "vertical" && ( )} - {item.Type === "Series" && } + {item.Type === "Series" && orientation === "vertical" && ( + + )} + {item.Type === "Series" && orientation === "horizontal" && ( + + )} {item.Type === "Program" && ( )} diff --git a/utils/atoms/settings.ts b/utils/atoms/settings.ts index 9583bf68..191e42f4 100644 --- a/utils/atoms/settings.ts +++ b/utils/atoms/settings.ts @@ -80,6 +80,7 @@ export type Home = { export type HomeSection = { orientation?: "horizontal" | "vertical"; items?: HomeSectionItemResolver; + nextUp?: HomeSectionNextUpResolver; }; export type HomeSectionItemResolver = { @@ -92,6 +93,13 @@ export type HomeSectionItemResolver = { filters?: Array; }; +export type HomeSectionNextUpResolver = { + parentId?: string; + limit?: number; + enableResumable?: boolean; + enableRewatching?: boolean; +}; + export type Settings = { home?: Home | null; autoRotate?: boolean;