aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/VideosController.cs
diff options
context:
space:
mode:
authorMister Rajoy <danielarezdiaz@gmail.com>2020-08-08 21:21:32 +0200
committerMister Rajoy <danielarezdiaz@gmail.com>2020-08-08 21:21:32 +0200
commit3ea4d9303e2d83e6b7c2a934c302349b2997045e (patch)
treecb23969b69ef1ac4dd19459ccad64249cc18818b /Jellyfin.Api/Controllers/VideosController.cs
parentb9fdbaeef326a06ba824cbb78a91f58afc535aab (diff)
Fix Split versions
Diffstat (limited to 'Jellyfin.Api/Controllers/VideosController.cs')
-rw-r--r--Jellyfin.Api/Controllers/VideosController.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/VideosController.cs b/Jellyfin.Api/Controllers/VideosController.cs
index fe065c76f..fafa722c5 100644
--- a/Jellyfin.Api/Controllers/VideosController.cs
+++ b/Jellyfin.Api/Controllers/VideosController.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
@@ -170,6 +170,11 @@ namespace Jellyfin.Api.Controllers
return NotFound("The video either does not exist or the id does not belong to a video.");
}
+ if (video.LinkedAlternateVersions.Length == 0)
+ {
+ video = (Video)_libraryManager.GetItemById(video.PrimaryVersionId);
+ }
+
foreach (var link in video.GetLinkedAlternateVersions())
{
link.SetPrimaryVersionId(null);