From 1d631540ace68a8079aba7f5a4d790397bcd3317 Mon Sep 17 00:00:00 2001 From: Felix Ruhnow Date: Tue, 19 Feb 2019 12:06:50 +0100 Subject: [PATCH] adressing pr comments --- MediaBrowser.Api/UserLibrary/ItemsService.cs | 4 ++-- 1 file 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 { - Items = new BaseItem[0], + Items = Array.Empty(), TotalRecordCount = 0 }; }