diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-13 14:26:34 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-13 14:26:34 -0400 |
| commit | a2557d7981e1f0f372ec2052441690a92f82d2db (patch) | |
| tree | c0cf3bb6363e0004e09507bd666730c71b4b8c0e | |
| parent | bf8da46f171bbfa0864dedf98ec5ec871052aec8 (diff) | |
fixes #334 - Server side indexing routine is falling down
| -rw-r--r-- | MediaBrowser.Controller/Entities/IndexFolder.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Entities/IndexFolder.cs b/MediaBrowser.Controller/Entities/IndexFolder.cs index c748b231e..b8e04acf6 100644 --- a/MediaBrowser.Controller/Entities/IndexFolder.cs +++ b/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> |
