mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-23 06:00:47 +02:00
Fix Split versions
This commit is contained in:
parent
b9fdbaeef3
commit
3ea4d9303e
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Globalization;
|
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.");
|
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())
|
foreach (var link in video.GetLinkedAlternateVersions())
|
||||||
{
|
{
|
||||||
link.SetPrimaryVersionId(null);
|
link.SetPrimaryVersionId(null);
|
||||||
|
|
Loading…
Reference in a new issue