diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-05-10 15:20:17 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-05-10 15:20:17 -0400 |
| commit | 9a730263896a648b3ec7af10d591ea4113842dcb (patch) | |
| tree | dc2629fc19a482e1b5322dc0abf088551117b8bc /MediaBrowser.Server.Implementations/Library/LibraryManager.cs | |
| parent | 3dc494c02d125a17770f286cf5fe2aad5b56ef38 (diff) | |
update item counts
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index ec62e733b..0c342986f 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -306,9 +306,14 @@ namespace MediaBrowser.Server.Implementations.Library /// <returns>Task.</returns> private async Task UpdateSeasonZeroNames(string newName, CancellationToken cancellationToken) { - var seasons = RootFolder.GetRecursiveChildren(i => i is Season) - .Cast<Season>() - .Where(i => i.IndexNumber.HasValue && i.IndexNumber.Value == 0 && !string.Equals(i.Name, newName, StringComparison.Ordinal)) + var seasons = GetItemList(new InternalItemsQuery + { + IncludeItemTypes = new[] { typeof(Season).Name }, + Recursive = true, + IndexNumber = 0 + + }).Cast<Season>() + .Where(i => !string.Equals(i.Name, newName, StringComparison.Ordinal)) .ToList(); foreach (var season in seasons) |
