mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-01 19:33:28 +02:00
Fix disabled libraries being returned in MediaFolders api (#11236)
This commit is contained in:
parent
ee4a782ed4
commit
00620a4092
|
@ -520,7 +520,11 @@ public class LibraryController : BaseJellyfinApiController
|
||||||
[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(_libraryManager.RootFolder.VirtualChildren).OrderBy(i => i.SortName).ToList();
|
var items = _libraryManager.GetUserRootFolder().Children
|
||||||
|
.Concat(_libraryManager.RootFolder.VirtualChildren)
|
||||||
|
.Where(i => _libraryManager.GetLibraryOptions(i).Enabled)
|
||||||
|
.OrderBy(i => i.SortName)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
if (isHidden.HasValue)
|
if (isHidden.HasValue)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue