From d49494476770b3c0a091841bd3bbd44862fb8137 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 9 Mar 2014 18:14:44 -0400 Subject: calculate item by name counts on the fly --- MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index 6e9d803bf..b190b8947 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -484,6 +484,9 @@ namespace MediaBrowser.Server.Implementations.Library await ItemRepository.DeleteItem(child.Id, CancellationToken.None).ConfigureAwait(false); } + BaseItem removed; + _libraryItemsCache.TryRemove(item.Id, out removed); + ReportItemRemoved(item); } @@ -922,10 +925,10 @@ namespace MediaBrowser.Server.Implementations.Library /// Task. public Task ValidatePeople(CancellationToken cancellationToken, IProgress progress) { - // Ensure the location is unavailable. + // Ensure the location is available. Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.PeoplePath); - return new PeopleValidator(this, _logger).ValidatePeople(cancellationToken, progress); + return new PeopleValidator(this, _logger).ValidatePeople(cancellationToken, new MetadataRefreshOptions(), progress); } /// @@ -953,7 +956,7 @@ namespace MediaBrowser.Server.Implementations.Library // Ensure the location is unavailable. Directory.CreateDirectory(ConfigurationManager.ApplicationPaths.MusicGenrePath); - return new MusicGenresValidator(this, _userManager, _logger).Run(progress, cancellationToken); + return new MusicGenresValidator(this, _logger).Run(progress, cancellationToken); } /// -- cgit v1.2.3