diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-14 21:25:58 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-07-14 21:25:58 -0400 |
| commit | 98012480f70cdfa918bbea1ae975d6f7cb8c7f67 (patch) | |
| tree | e7e31594ed6f2e461ba146c549df52fb5a3892b2 /MediaBrowser.Api/BaseApiService.cs | |
| parent | 9c252f3e50e1396009eb3e35163e013036c3af77 (diff) | |
fix ipad login issue
Diffstat (limited to 'MediaBrowser.Api/BaseApiService.cs')
| -rw-r--r-- | MediaBrowser.Api/BaseApiService.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs index 09eb1ea41..727ee6fbc 100644 --- a/MediaBrowser.Api/BaseApiService.cs +++ b/MediaBrowser.Api/BaseApiService.cs @@ -125,7 +125,7 @@ namespace MediaBrowser.Api return ResultFactory.GetStaticFileResult(Request, path); } - private readonly char[] _dashReplaceChars = new[] { '?', '/' }; + private readonly char[] _dashReplaceChars = { '?', '/' }; private const char SlugChar = '-'; protected MusicArtist GetArtist(string name, ILibraryManager libraryManager) @@ -168,6 +168,11 @@ namespace MediaBrowser.Api { var user = userManager.GetUserById(userId.Value); + if (user == null) + { + throw new ArgumentException("User not found"); + } + return folder.GetRecursiveChildren(user); } @@ -177,6 +182,11 @@ namespace MediaBrowser.Api { var user = userManager.GetUserById(userId.Value); + if (user == null) + { + throw new ArgumentException("User not found"); + } + return userManager.GetUserById(userId.Value).RootFolder.GetRecursiveChildren(user); } |
