Forráskód Böngészése

fixes #334 - Server side indexing routine is falling down

Luke Pulverenti 12 éve
szülő
commit
a2557d7981
1 módosított fájl, 4 hozzáadás és 3 törlés
  1. 4 3
      MediaBrowser.Controller/Entities/IndexFolder.cs

+ 4 - 3
MediaBrowser.Controller/Entities/IndexFolder.cs

@@ -1,6 +1,7 @@
-using System;
-using MediaBrowser.Common.Extensions;
+using MediaBrowser.Common.Extensions;
 using MediaBrowser.Model.Entities;
+using MoreLinq;
+using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
@@ -135,7 +136,7 @@ namespace MediaBrowser.Controller.Entities
             // Now - since we built the index grouping from the bottom up - we now need to properly set Parents from the top down
             SetParents(this, kids.OfType<IndexFolder>());
 
-            return new ConcurrentDictionary<Guid,BaseItem>(kids.ToDictionary(i => i.Id));
+            return new ConcurrentDictionary<Guid, BaseItem>(kids.DistinctBy(i => i.Id).ToDictionary(i => i.Id));
         }
 
         /// <summary>