Browse Source

show album count

Luke Pulverenti 11 years ago
parent
commit
5b93895c14

+ 2 - 6
MediaBrowser.Server.Implementations/Library/Validators/ArtistsValidator.cs

@@ -72,10 +72,6 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
 
 
             var numComplete = 0;
             var numComplete = 0;
 
 
-            var userLibraries = _userManager.Users
-                .Select(i => new Tuple<Guid, IHasArtist[]>(i.Id, i.RootFolder.GetRecursiveChildren(i).OfType<IHasArtist>().ToArray()))
-                .ToArray();
-
             foreach (var artist in allArtists)
             foreach (var artist in allArtists)
             {
             {
                 cancellationToken.ThrowIfCancellationRequested();
                 cancellationToken.ThrowIfCancellationRequested();
@@ -110,9 +106,9 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
                 // Populate counts of items
                 // Populate counts of items
                 //SetItemCounts(artist, null, allItems.OfType<IHasArtist>());
                 //SetItemCounts(artist, null, allItems.OfType<IHasArtist>());
 
 
-                foreach (var lib in userLibraries)
+                foreach (var user in _userManager.Users.ToArray())
                 {
                 {
-                    SetItemCounts(artist, lib.Item1, lib.Item2);
+                    SetItemCounts(artist, user.Id, user.RootFolder.GetRecursiveChildren(user).OfType<IHasArtist>().ToArray());
                 }
                 }
 
 
                 numComplete++;
                 numComplete++;