2
0
Эх сурвалжийг харах

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

Bill Thornton 1 жил өмнө
parent
commit
00620a4092

+ 5 - 1
Jellyfin.Api/Controllers/LibraryController.cs

@@ -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)
         {