소스 검색

Fix Split versions

Mister Rajoy 4 년 전
부모
커밋
3ea4d9303e
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      Jellyfin.Api/Controllers/VideosController.cs

+ 6 - 1
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);