aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2021-03-05 19:57:48 +0100
committercvium <clausvium@gmail.com>2021-03-05 19:57:48 +0100
commit59814bd55e8c6c5fbd167e90403b9bd2e390c78c (patch)
treedea42174696189b6252b748e8b709e7ac3698951 /Jellyfin.Api/Controllers
parent8615847a8aba1f504b184e79907e6885215ffdaa (diff)
do not pick a linked item as primary when merging versions
Diffstat (limited to 'Jellyfin.Api/Controllers')
-rw-r--r--Jellyfin.Api/Controllers/VideosController.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/VideosController.cs b/Jellyfin.Api/Controllers/VideosController.cs
index 44dc63952..195a96a56 100644
--- a/Jellyfin.Api/Controllers/VideosController.cs
+++ b/Jellyfin.Api/Controllers/VideosController.cs
@@ -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