aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Implementations/Collections/CollectionManager.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs
index 151e86948..db532ce5b 100644
--- a/Emby.Server.Implementations/Collections/CollectionManager.cs
+++ b/Emby.Server.Implementations/Collections/CollectionManager.cs
@@ -347,11 +347,13 @@ namespace Emby.Server.Implementations.Collections
var alreadyInResults = false;
foreach (var child in item.GetMediaSources(true))
{
- if (results.ContainsKey(Guid.Parse(child.Id)))
+ if (Guid.TryParse(child.Id, out var id) && results.ContainsKey(id))
{
alreadyInResults = true;
+ break;
}
}
+
if (!alreadyInResults)
{
results[item.Id] = item;