Fix disabled libraries being returned in MediaFolders api (#11236)

pull/11351/head
Bill Thornton 1 month ago committed by GitHub
parent ee4a782ed4
commit 00620a4092
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -520,7 +520,11 @@ public class LibraryController : BaseJellyfinApiController
[ProducesResponseType(StatusCodes.Status200OK)]
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)
{

Loading…
Cancel
Save