aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/LibraryStructureController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-09-03 10:37:35 -0600
committercrobibero <cody@robibe.ro>2020-09-03 10:37:35 -0600
commitb035a642d27ea4b0a22e9a539c641a055bac056b (patch)
tree9b7ad34430d923a841a5789f49bb4dde2578c339 /Jellyfin.Api/Controllers/LibraryStructureController.cs
parent5e6cdc8842c3c81eb7e0363e6d36fac6630304e1 (diff)
parent645db0524fb1368135ecea9e5b776ad9b490b17b (diff)
Merge remote-tracking branch 'upstream/master' into plugin-install
Diffstat (limited to 'Jellyfin.Api/Controllers/LibraryStructureController.cs')
-rw-r--r--Jellyfin.Api/Controllers/LibraryStructureController.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.cs
index cdab4f356..d290e3c5b 100644
--- a/Jellyfin.Api/Controllers/LibraryStructureController.cs
+++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs
@@ -76,7 +76,7 @@ namespace Jellyfin.Api.Controllers
[FromQuery] string? name,
[FromQuery] string? collectionType,
[FromQuery] string[] paths,
- [FromBody] LibraryOptionsDto? libraryOptionsDto,
+ [FromBody] AddVirtualFolderDto? libraryOptionsDto,
[FromQuery] bool refreshLibrary = false)
{
var libraryOptions = libraryOptionsDto?.LibraryOptions ?? new LibraryOptions();
@@ -312,19 +312,17 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// Update library options.
/// </summary>
- /// <param name="id">The library name.</param>
- /// <param name="libraryOptions">The library options.</param>
+ /// <param name="request">The library name and options.</param>
/// <response code="204">Library updated.</response>
/// <returns>A <see cref="NoContentResult"/>.</returns>
[HttpPost("LibraryOptions")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult UpdateLibraryOptions(
- [FromQuery] string? id,
- [FromBody] LibraryOptions? libraryOptions)
+ [FromBody] UpdateLibraryOptionsDto request)
{
- var collectionFolder = (CollectionFolder)_libraryManager.GetItemById(id);
+ var collectionFolder = (CollectionFolder)_libraryManager.GetItemById(request.Id);
- collectionFolder.UpdateLibraryOptions(libraryOptions);
+ collectionFolder.UpdateLibraryOptions(request.LibraryOptions);
return NoContent();
}
}