From 2c499d1e86f1ea3ee087bc8f6ff101a1b1ec2ab3 Mon Sep 17 00:00:00 2001 From: Johannes Heuel Date: Fri, 28 Mar 2025 13:54:12 +0100 Subject: feat: allow grouping shows into collections (#13236) * feat: allow grouping shows into collections * add pre-startup routine to rename EnableGroupingIntoCollections * Update Jellyfin.Server/Migrations/PreStartupRoutines/RenameEnableGroupingIntoCollections.cs --- MediaBrowser.Controller/Entities/Folder.cs | 12 +++++------- MediaBrowser.Controller/Entities/TV/Series.cs | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index dd85a6ec0..4da22854b 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1064,11 +1064,6 @@ namespace MediaBrowser.Controller.Entities return false; } - if (queryParent is Series) - { - return false; - } - if (queryParent is Season) { return false; @@ -1088,12 +1083,15 @@ namespace MediaBrowser.Controller.Entities if (!param.HasValue) { - if (user is not null && !configurationManager.Configuration.EnableGroupingIntoCollections) + if (user is not null && query.IncludeItemTypes.Any(type => + (type == BaseItemKind.Movie && !configurationManager.Configuration.EnableGroupingMoviesIntoCollections) || + (type == BaseItemKind.Series && !configurationManager.Configuration.EnableGroupingShowsIntoCollections))) { return false; } - if (query.IncludeItemTypes.Length == 0 || query.IncludeItemTypes.Contains(BaseItemKind.Movie)) + if (query.IncludeItemTypes.Length == 0 + || query.IncludeItemTypes.Any(type => type == BaseItemKind.Movie || type == BaseItemKind.Series)) { param = true; } diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 8d5557622..b4ad05921 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -24,7 +24,7 @@ namespace MediaBrowser.Controller.Entities.TV /// /// Class Series. /// - public class Series : Folder, IHasTrailers, IHasDisplayOrder, IHasLookupInfo, IMetadataContainer + public class Series : Folder, IHasTrailers, IHasDisplayOrder, IHasLookupInfo, IMetadataContainer, ISupportsBoxSetGrouping { public Series() { -- cgit v1.2.3