diff --git a/MediaBrowser.Api/TvShowsService.cs b/MediaBrowser.Api/TvShowsService.cs index ceccbe423e..3f248ea8f0 100644 --- a/MediaBrowser.Api/TvShowsService.cs +++ b/MediaBrowser.Api/TvShowsService.cs @@ -327,7 +327,8 @@ namespace MediaBrowser.Api MinPremiereDate = minPremiereDate, StartIndex = request.StartIndex, Limit = request.Limit, - ParentId = parentIdGuid + ParentId = parentIdGuid, + Recursive = true }).ToList(); diff --git a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs b/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs index ba6534a7c3..b65c030f03 100644 --- a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs +++ b/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs @@ -32,9 +32,7 @@ namespace MediaBrowser.Server.Implementations.TV throw new ArgumentException("User not found"); } - var parentIds = string.IsNullOrEmpty(request.ParentId) - ? new string[] { } - : new[] { request.ParentId }; + var parentIdGuid = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId); string presentationUniqueKey = null; int? limit = null; @@ -54,9 +52,11 @@ namespace MediaBrowser.Server.Implementations.TV IncludeItemTypes = new[] { typeof(Series).Name }, SortOrder = SortOrder.Ascending, PresentationUniqueKey = presentationUniqueKey, - Limit = limit + Limit = limit, + ParentId = parentIdGuid, + Recursive = true - }, parentIds).Cast(); + }).Cast(); // Avoid implicitly captured closure var episodes = GetNextUpEpisodes(request, user, items);