mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-25 06:27:15 -04:00
do not pick a linked item as primary when merging versions
This commit is contained in:
parent
8615847a8a
commit
59814bd55e
1 changed files with 1 additions and 3 deletions
|
@ -217,9 +217,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
return BadRequest("Please supply at least two videos to merge.");
|
return BadRequest("Please supply at least two videos to merge.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var videosWithVersions = items.Where(i => i.MediaSourceCount > 1).ToList();
|
var primaryVersion = items.FirstOrDefault(i => i.MediaSourceCount > 1 && string.IsNullOrEmpty(i.PrimaryVersionId));
|
||||||
|
|
||||||
var primaryVersion = videosWithVersions.FirstOrDefault();
|
|
||||||
if (primaryVersion == null)
|
if (primaryVersion == null)
|
||||||
{
|
{
|
||||||
primaryVersion = items
|
primaryVersion = items
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue