aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/ItemsService.cs
diff options
context:
space:
mode:
authorFelix Ruhnow <felix.ruhnow@gmail.com>2019-02-19 12:06:50 +0100
committerFelix Ruhnow <felix.ruhnow@gmail.com>2019-02-19 12:06:50 +0100
commit1d631540ace68a8079aba7f5a4d790397bcd3317 (patch)
tree7768182ba54848915c7485961ead1dd4044ac1ea /MediaBrowser.Api/UserLibrary/ItemsService.cs
parent967d5deeb79405ce7122c6124dac019b278ca70b (diff)
adressing pr comments
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 895c88dc8..aae86e416 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -228,12 +228,12 @@ namespace MediaBrowser.Api.UserLibrary
request.IncludeItemTypes = "Playlist";
}
- if (!user.Policy.EnabledFolders.Where(i => new Guid(i).Equals(item.Id)).Any() && !user.Policy.EnableAllFolders)
+ if (!user.Policy.EnableAllFolders && !user.Policy.EnabledFolders.Any(i => new Guid(i).Equals(item.Id)))
{
Logger.LogWarning($"{user.Name} is not permitted to access Library {item.Name}.");
return new QueryResult<BaseItem>
{
- Items = new BaseItem[0],
+ Items = Array.Empty<BaseItem>(),
TotalRecordCount = 0
};
}