mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #5324 from danieladov/master
Fix duplicated movies when group movies into collections is enabled (cherry picked from commit bd70f562189e81d409caf2f4f67d8d495d4bbf1e) Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
4a320b26b5
commit
da3b7bb684
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user