From 600276cb69e05814957755223b52bc737f38c1bc Mon Sep 17 00:00:00 2001 From: sarendsen Date: Thu, 26 Dec 2024 11:27:26 +0100 Subject: [PATCH 1/2] Use recursive param so that merged versions show up as a single entity --- .../(home,libraries,search)/collections/[collectionId].tsx | 3 +++ app/(auth)/(tabs)/(libraries)/[libraryId].tsx | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/(auth)/(tabs)/(home,libraries,search)/collections/[collectionId].tsx b/app/(auth)/(tabs)/(home,libraries,search)/collections/[collectionId].tsx index 514f474c..4c2b72ae 100644 --- a/app/(auth)/(tabs)/(home,libraries,search)/collections/[collectionId].tsx +++ b/app/(auth)/(tabs)/(home,libraries,search)/collections/[collectionId].tsx @@ -104,9 +104,12 @@ const page: React.FC = () => { "CanDelete", "MediaSourceCount", ], + // true is needed for merged versions + recursive: true, genres: selectedGenres, tags: selectedTags, years: selectedYears.map((year) => parseInt(year)), + includeItemTypes: ["Movie", "Series", "MusicAlbum"], }); return response.data || null; diff --git a/app/(auth)/(tabs)/(libraries)/[libraryId].tsx b/app/(auth)/(tabs)/(libraries)/[libraryId].tsx index 1051b890..685e1267 100644 --- a/app/(auth)/(tabs)/(libraries)/[libraryId].tsx +++ b/app/(auth)/(tabs)/(libraries)/[libraryId].tsx @@ -46,7 +46,7 @@ import { colletionTypeToItemType } from "@/utils/collectionTypeToItemType"; const Page = () => { const searchParams = useLocalSearchParams(); const { libraryId } = searchParams as { libraryId: string }; - + console.log(libraryId); const [api] = useAtom(apiAtom); const [user] = useAtom(userAtom); const { width: screenWidth } = useWindowDimensions(); @@ -151,6 +151,8 @@ const Page = () => { itemType = "Movie"; } else if (library.CollectionType === "tvshows") { itemType = "Series"; + } else if (library.CollectionType === "boxsets") { + itemType = "BoxSet"; } const response = await getItemsApi(api).getItems({ @@ -161,7 +163,8 @@ const Page = () => { sortBy: [sortBy[0], "SortName", "ProductionYear"], sortOrder: [sortOrder[0]], enableImageTypes: ["Primary", "Backdrop", "Banner", "Thumb"], - recursive: false, + // true is needed for merged versions + recursive: true, imageTypeLimit: 1, fields: ["PrimaryImageAspectRatio", "SortName"], genres: selectedGenres, From 5af735065ac58c0001455984c747873f55df8f5d Mon Sep 17 00:00:00 2001 From: sarendsen Date: Thu, 26 Dec 2024 11:31:37 +0100 Subject: [PATCH 2/2] Remove console.log --- app/(auth)/(tabs)/(libraries)/[libraryId].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(auth)/(tabs)/(libraries)/[libraryId].tsx b/app/(auth)/(tabs)/(libraries)/[libraryId].tsx index 685e1267..7d5679a1 100644 --- a/app/(auth)/(tabs)/(libraries)/[libraryId].tsx +++ b/app/(auth)/(tabs)/(libraries)/[libraryId].tsx @@ -46,7 +46,7 @@ import { colletionTypeToItemType } from "@/utils/collectionTypeToItemType"; const Page = () => { const searchParams = useLocalSearchParams(); const { libraryId } = searchParams as { libraryId: string }; - console.log(libraryId); + const [api] = useAtom(apiAtom); const [user] = useAtom(userAtom); const { width: screenWidth } = useWindowDimensions();