diff options
| author | JPVenson <github@jpb.software> | 2025-02-21 11:08:09 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.software> | 2025-02-21 11:08:09 +0000 |
| commit | 8c0b0d910229d7691b638d2aee5aa5a8aa07fe17 (patch) | |
| tree | 2e4177bd57586f9e41747f582dddae9d70d78466 /Jellyfin.Api/Controllers/LibraryStructureController.cs | |
| parent | 963f2357a966dd7a5a6ab248155cc52ce066753b (diff) | |
| parent | 712908d53c7ca38d13e03ea7809e0c40e862a5fb (diff) | |
Merge remote-tracking branch 'jellyfinorigin/master' into feature/10.10/DetachedMigration
Diffstat (limited to 'Jellyfin.Api/Controllers/LibraryStructureController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/LibraryStructureController.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.cs index 93c2393f3..2a885662b 100644 --- a/Jellyfin.Api/Controllers/LibraryStructureController.cs +++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs @@ -77,7 +77,7 @@ public class LibraryStructureController : BaseJellyfinApiController public async Task<ActionResult> AddVirtualFolder( [FromQuery] string name, [FromQuery] CollectionTypeOptions? collectionType, - [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] paths, + [FromQuery, ModelBinder(typeof(CommaDelimitedCollectionModelBinder))] string[] paths, [FromBody] AddVirtualFolderDto? libraryOptionsDto, [FromQuery] bool refreshLibrary = false) { @@ -99,6 +99,7 @@ public class LibraryStructureController : BaseJellyfinApiController /// <param name="name">The name of the folder.</param> /// <param name="refreshLibrary">Whether to refresh the library.</param> /// <response code="204">Folder removed.</response> + /// <response code="404">Folder not found.</response> /// <returns>A <see cref="NoContentResult"/>.</returns> [HttpDelete] [ProducesResponseType(StatusCodes.Status204NoContent)] @@ -106,7 +107,9 @@ public class LibraryStructureController : BaseJellyfinApiController [FromQuery] string name, [FromQuery] bool refreshLibrary = false) { + // TODO: refactor! this relies on an FileNotFound exception to return NotFound when attempting to remove a library that does not exist. await _libraryManager.RemoveVirtualFolder(name, refreshLibrary).ConfigureAwait(false); + return NoContent(); } |
