Add clearer exceptions, warnings and docs

This commit is contained in:
Bond_009
2019-10-20 21:12:03 +02:00
parent fdb0c3a1df
commit fef35d0505
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>();