LibraryController.cs (jellyfin-10.8.7) | : | LibraryController.cs (jellyfin-10.8.8) | ||
---|---|---|---|---|
skipping to change at line 495 | skipping to change at line 495 | |||
.SelectMany(c => c.PhysicalLocations)); | .SelectMany(c => c.PhysicalLocations)); | |||
} | } | |||
/// <summary> | /// <summary> | |||
/// Gets all user media folders. | /// Gets all user media folders. | |||
/// </summary> | /// </summary> | |||
/// <param name="isHidden">Optional. Filter by folders that are marked h idden, or not.</param> | /// <param name="isHidden">Optional. Filter by folders that are marked h idden, or not.</param> | |||
/// <response code="200">Media folders returned.</response> | /// <response code="200">Media folders returned.</response> | |||
/// <returns>List of user media folders.</returns> | /// <returns>List of user media folders.</returns> | |||
[HttpGet("Library/MediaFolders")] | [HttpGet("Library/MediaFolders")] | |||
[Authorize(Policy = Policies.DefaultAuthorization)] | [Authorize(Policy = Policies.RequiresElevation)] | |||
[ProducesResponseType(StatusCodes.Status200OK)] | [ProducesResponseType(StatusCodes.Status200OK)] | |||
public ActionResult<QueryResult<BaseItemDto>> GetMediaFolders([FromQuery ] bool? isHidden) | public ActionResult<QueryResult<BaseItemDto>> GetMediaFolders([FromQuery ] bool? isHidden) | |||
{ | { | |||
var items = _libraryManager.GetUserRootFolder().Children.Concat(_lib raryManager.RootFolder.VirtualChildren).OrderBy(i => i.SortName).ToList(); | var items = _libraryManager.GetUserRootFolder().Children.Concat(_lib raryManager.RootFolder.VirtualChildren).OrderBy(i => i.SortName).ToList(); | |||
if (isHidden.HasValue) | if (isHidden.HasValue) | |||
{ | { | |||
var val = isHidden.Value; | var val = isHidden.Value; | |||
items = items.Where(i => i.IsHidden == val).ToList(); | items = items.Where(i => i.IsHidden == val).ToList(); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |