mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #5383 from cvium/fix-mergeversions-overflow
do not pick a linked item as primary when merging versions (cherry picked from commit 3741be51ec4b44f946bcdc3ad4f5232af0e2e929) Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
75d3d120d3
commit
132335a747
@ -217,9 +217,7 @@ namespace Jellyfin.Api.Controllers
|
||||
return BadRequest("Please supply at least two videos to merge.");
|
||||
}
|
||||
|
||||
var videosWithVersions = items.Where(i => i.MediaSourceCount > 1).ToList();
|
||||
|
||||
var primaryVersion = videosWithVersions.FirstOrDefault();
|
||||
var primaryVersion = items.FirstOrDefault(i => i.MediaSourceCount > 1 && string.IsNullOrEmpty(i.PrimaryVersionId));
|
||||
if (primaryVersion == null)
|
||||
{
|
||||
primaryVersion = items
|
||||
|
Loading…
x
Reference in New Issue
Block a user