浏览代码

Merge pull request #1437 from pjeanjean/master

Fix issue #1436: media folders appear empty unless user has all libraries access
Anthony Lavado 6 年之前
父节点
当前提交
127bfc7d3b
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      CONTRIBUTORS.md
  2. 1 1
      MediaBrowser.Api/UserLibrary/ItemsService.cs

+ 1 - 0
CONTRIBUTORS.md

@@ -24,6 +24,7 @@
  - [Lynxy](https://github.com/Lynxy)
  - [fasheng](https://github.com/fasheng)
  - [ploughpuff](https://github.com/ploughpuff) 
+ - [pjeanjean](https://github.com/pjeanjean)
 
 # Emby Contributors
 

+ 1 - 1
MediaBrowser.Api/UserLibrary/ItemsService.cs

@@ -224,7 +224,7 @@ namespace MediaBrowser.Api.UserLibrary
                 request.IncludeItemTypes = "Playlist";
             }
 
-            if (!user.Policy.EnableAllFolders && !user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id))
+            if (!(item is UserRootFolder) && !user.Policy.EnableAllFolders && !user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id))
             {
                 Logger.LogWarning("{UserName} is not permitted to access Library {ItemName}.", user.Name, item.Name);
                 return new QueryResult<BaseItem>