aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/VideosController.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-01-30 21:58:24 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-01-31 19:21:36 +0100
commit694db80d4c8e83ff381af56d2a3dde29e0855c3d (patch)
tree4e23899944d4be1389f6f92d3bb98b400bb92a74 /Jellyfin.Api/Controllers/VideosController.cs
parenta650148dfd9920986e11d414a71df5b1a7f604e8 (diff)
Reroute on version removal
Diffstat (limited to 'Jellyfin.Api/Controllers/VideosController.cs')
-rw-r--r--Jellyfin.Api/Controllers/VideosController.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/VideosController.cs b/Jellyfin.Api/Controllers/VideosController.cs
index 2237e36b5f..1c8b695458 100644
--- a/Jellyfin.Api/Controllers/VideosController.cs
+++ b/Jellyfin.Api/Controllers/VideosController.cs
@@ -222,6 +222,9 @@ public class VideosController : BaseJellyfinApiController
await item.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
+ // Re-route any playlist/collection references from this item to the primary
+ _libraryManager.RerouteLinkedChildReferences(item.Id, primaryVersion.Id);
+
if (!alternateVersionsOfPrimary.Any(i => i.ItemId.HasValue && i.ItemId.Value.Equals(item.Id)))
{
alternateVersionsOfPrimary.Add(new LinkedChild