Browse Source

Prevent PlaylistsFolder deletion during library removal

theguymadmax 1 week ago
parent
commit
49c3443b0c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      MediaBrowser.Controller/Entities/Folder.cs

+ 6 - 0
MediaBrowser.Controller/Entities/Folder.cs

@@ -457,6 +457,12 @@ namespace MediaBrowser.Controller.Entities
                 {
                     foreach (var item in itemsRemoved)
                     {
+                        if (!item.CanDelete())
+                        {
+                            Logger.LogDebug("Item marked as non-removable, skipping: {Path}", item.Path ?? item.Name);
+                            continue;
+                        }
+
                         if (item.IsFileProtocol)
                         {
                             Logger.LogDebug("Removed item: {Path}", item.Path);