|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|