From 457c53da6f48a1fd3af2b5211c21e3c44b008258 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Fri, 27 Feb 2026 21:22:47 +0100 Subject: [PATCH] Decouple demotion detection from deletion --- MediaBrowser.Controller/Entities/Folder.cs | 34 +++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index cc322d0ddd..ed41bdb6ba 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -513,19 +513,6 @@ namespace MediaBrowser.Controller.Entities // Check if path is in LocalAlternateVersions of any valid child if (!string.IsNullOrEmpty(item.Path) && alternateVersionPaths.Contains(item.Path)) { - // If this was a primary (no PrimaryVersionId, no OwnerId), it needs demotion - if (video.OwnerId.IsEmpty()) - { - var newPrimary = newItems - .OfType