From 0ff0fab3f41cd3a5265f2311f0e23768fd463080 Mon Sep 17 00:00:00 2001 From: sarendsen Date: Wed, 15 Jan 2025 00:47:10 +0100 Subject: [PATCH 1/3] fix: fix horizontal shows --- components/ContinueWatchingPoster.tsx | 5 +++++ components/home/ScrollingCollectionList.tsx | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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" && ( )} From 7a30a633358e0d1c859df3de0a6dbe6ec2a03725 Mon Sep 17 00:00:00 2001 From: lostb1t Date: Wed, 15 Jan 2025 09:13:03 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) 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 From 72b9675df4a39bbd8f6ad5a942ef15e186af609e Mon Sep 17 00:00:00 2001 From: sarendsen Date: Thu, 16 Jan 2025 10:36:20 +0100 Subject: [PATCH 3/3] feat: Implement nextup for custom home --- app/(auth)/(tabs)/(home)/index.tsx | 25 +++++++++++++++++++------ utils/atoms/settings.ts | 8 ++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) 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/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;