The Free Software Media System - Server Backend & API
Added Pipeline debug code
JPVenson056dcf7e8104
diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.csindex 93c2393f33..c520680000 100644--- a/Jellyfin.Api/Controllers/LibraryStructureController.cs+++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs@@ -106,7 +106,15 @@ public class LibraryStructureController : BaseJellyfinApiController[FromQuery] string name,[FromQuery] bool refreshLibrary = false){- await _libraryManager.RemoveVirtualFolder(name, refreshLibrary).ConfigureAwait(false);+ try+ {+ await _libraryManager.RemoveVirtualFolder(name, refreshLibrary).ConfigureAwait(false);+ }+ catch (Exception ex)+ {+ return BadRequest(ex.ToString());+ }+return NoContent();}diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.csindex 0376f57cc1..9d39b4bfaa 100644--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.cs+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/LibraryStructureControllerTests.cs@@ -120,6 +120,14 @@ public sealed class LibraryStructureControllerTests : IClassFixture<JellyfinApplclient.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));using var response = await client.DeleteAsync("Library/VirtualFolders?name=test&refreshLibrary=true");- Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);+ try+ {+ Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);+ }+ catch (Exception)+ {+ Console.WriteLine("DeleteFailed: " + response.Content.ReadAsStringAsync());+ throw;+ }}}