aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMister Rajoy <danielarezdiaz@gmail.com>2021-02-28 23:03:28 +0100
committerMister Rajoy <danielarezdiaz@gmail.com>2021-02-28 23:03:28 +0100
commit18cd634ec8316fe5978d7ad3867de66b85cd5fba (patch)
treee69ae4215260369a45316926386727eebbfe32ca
parent0fde0a82e4a914e1d9b4b9814d9f4942307a3c15 (diff)
Fix duplicated movies when group movies into collections is enabled
-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..449f8872f 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 (results.ContainsKey(Guid.Parse(child.Id)))
+ {
+ alreadyInResults = true;
+ }
+ }
+ if (!alreadyInResults)
+ {
+
+ results[item.Id] = item;
+ }
}
}
}