From d44b2e2ee5ecb06016b8b88eb03fc6dc28a04ee9 Mon Sep 17 00:00:00 2001 From: cvium Date: Tue, 13 Apr 2021 20:12:50 +0200 Subject: [PATCH] fixes --- .../Collections/CollectionManager.cs | 9 ++------- MediaBrowser.Controller/Entities/Folder.cs | 7 ++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 6dbbd55304..81758d9a76 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -341,12 +341,7 @@ namespace Emby.Server.Implementations.Collections itemIsInBoxSet = true; - if (results.ContainsKey(boxSet.Id)) - { - continue; - } - - results[boxSet.Id] = boxSet; + results.TryAdd(boxSet.Id, boxSet); } // skip any item that is in a box set @@ -373,7 +368,7 @@ namespace Emby.Server.Implementations.Collections if (!alreadyInResults) { - results[item.Id] = item; + results[itemId] = item; } } } diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 485733abbc..bd1fbb4731 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1436,7 +1436,12 @@ namespace MediaBrowser.Controller.Entities { if (i.ItemId.HasValue) { - return i.ItemId.Value == itemId; + if (i.ItemId.Value == itemId) + { + return true; + } + + continue; } var child = GetLinkedChild(i);