do not pick a linked item as primary when merging versions

This commit is contained in:
cvium 2021-03-05 19:57:48 +01:00
parent 8615847a8a
commit 59814bd55e

View File

@ -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