aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-10-20 21:12:03 +0200
committerBond_009 <bond.009@outlook.com>2019-10-20 21:12:03 +0200
commitfef35d0505c6485954b1eb233a5ea67e33fe1138 (patch)
tree13c53aa1a6e295196ac935ea21e0c0dcc56f128c /MediaBrowser.Controller/Entities
parentfdb0c3a1dff0c1e9c3c22a3be688b97ea0bd7a6d (diff)
Add clearer exceptions, warnings and docs
Diffstat (limited to 'MediaBrowser.Controller/Entities')
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index d61a07066..b697f6576 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -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>();