Merge pull request #1926 from Bond-009/auth

Add clearer exceptions, warnings and docs
This commit is contained in:
dkanada
2019-11-23 01:14:32 +09:00
committed by GitHub
10 changed files with 63 additions and 57 deletions

View File

@@ -1152,6 +1152,11 @@ namespace MediaBrowser.Controller.Entities
public List<BaseItem> GetChildren(User user, bool includeLinkedChildren)
{
if (user == null)
{
throw new ArgumentNullException(nameof(user));
}
return GetChildren(user, includeLinkedChildren, null);
}
@@ -1163,7 +1168,10 @@ namespace MediaBrowser.Controller.Entities
}
//the true root should return our users root folder children
if (IsPhysicalRoot) return LibraryManager.GetUserRootFolder().GetChildren(user, includeLinkedChildren);
if (IsPhysicalRoot)
{
return LibraryManager.GetUserRootFolder().GetChildren(user, includeLinkedChildren);
}
var result = new Dictionary<Guid, BaseItem>();