From a69f8ecb3dd9267d9b94d8b6ab60e7193c21cf7c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 17 Aug 2016 01:33:30 -0400 Subject: [PATCH] update logging --- MediaBrowser.Controller/Entities/TV/Season.cs | 3 +++ MediaBrowser.Controller/Entities/TV/Series.cs | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index 66fe1cc75..78a974bf7 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -170,10 +170,13 @@ namespace MediaBrowser.Controller.Entities.TV Func filter = i => UserViewBuilder.Filter(i, user, query, UserDataManager, LibraryManager); + Logger.Debug("Season.GetItemsInternal entering GetEpisodes"); var items = GetEpisodes(user).Where(filter); + Logger.Debug("Season.GetItemsInternal entering PostFilterAndSort"); var result = PostFilterAndSort(items, query); + Logger.Debug("Season.GetItemsInternal complete"); return Task.FromResult(result); } diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 02ac42b2a..30c06b244 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -379,13 +379,19 @@ namespace MediaBrowser.Controller.Entities.TV private IEnumerable GetAllEpisodes(User user) { - return LibraryManager.GetItemList(new InternalItemsQuery(user) + Logger.Debug("Series.GetAllEpisodes entering GetItemList"); + + var result = LibraryManager.GetItemList(new InternalItemsQuery(user) { AncestorWithPresentationUniqueKey = GetUniqueSeriesKey(this), IncludeItemTypes = new[] { typeof(Episode).Name }, SortBy = new[] { ItemSortBy.SortName } - }).Cast(); + }).Cast().ToList(); + + Logger.Debug("Series.GetAllEpisodes returning {0} episodes", result.Count); + + return result; } public IEnumerable GetSeasonEpisodes(User user, Season parentSeason, bool includeMissingEpisodes, bool includeVirtualUnairedEpisodes)