aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/BaseApiService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/BaseApiService.cs')
-rw-r--r--MediaBrowser.Api/BaseApiService.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs
index e969d79ff..b3f5027e0 100644
--- a/MediaBrowser.Api/BaseApiService.cs
+++ b/MediaBrowser.Api/BaseApiService.cs
@@ -9,7 +9,6 @@ using ServiceStack.ServiceHost;
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Threading.Tasks;
namespace MediaBrowser.Api
{
@@ -125,6 +124,18 @@ namespace MediaBrowser.Api
return libraryManager.GetPerson(DeSlugPersonName(name, libraryManager));
}
+ protected IEnumerable<BaseItem> GetAllLibraryItems(Guid? userId, IUserManager userManager, ILibraryManager libraryManager)
+ {
+ if (userId.HasValue)
+ {
+ var user = userManager.GetUserById(userId.Value);
+
+ return userManager.GetUserById(userId.Value).RootFolder.GetRecursiveChildren(user);
+ }
+
+ return libraryManager.RootFolder.RecursiveChildren;
+ }
+
/// <summary>
/// Deslugs an artist name by finding the correct entry in the library
/// </summary>