aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Collections/CollectionManager.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-14 18:40:44 +0000
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-14 18:40:44 +0000
commit4c7680e186ec76053f6d54e29e5cd67c5a0b17f7 (patch)
treecf21e8a3ac31487d4126aa0fceaa498473f02c43 /Emby.Server.Implementations/Collections/CollectionManager.cs
parent6087831aa65398a6305570c4dc84f0bc2613b842 (diff)
parentbd70f562189e81d409caf2f4f67d8d495d4bbf1e (diff)
Merge remote-tracking branch 'upstream/master' into SubnetOverlappFix
Diffstat (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs')
-rw-r--r--Emby.Server.Implementations/Collections/CollectionManager.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs
index 1ab2bdfbe..db532ce5b 100644
--- a/Emby.Server.Implementations/Collections/CollectionManager.cs
+++ b/Emby.Server.Implementations/Collections/CollectionManager.cs
@@ -344,7 +344,20 @@ namespace Emby.Server.Implementations.Collections
}
else
{
- results[item.Id] = item;
+ var alreadyInResults = false;
+ foreach (var child in item.GetMediaSources(true))
+ {
+ if (Guid.TryParse(child.Id, out var id) && results.ContainsKey(id))
+ {
+ alreadyInResults = true;
+ break;
+ }
+ }
+
+ if (!alreadyInResults)
+ {
+ results[item.Id] = item;
+ }
}
}
}