diff options
| author | crobibero <cody@robibe.ro> | 2020-12-01 16:16:17 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-12-01 16:16:17 -0700 |
| commit | b5a7a74e897539a4f5389faca93bdfe5bfd5b4d5 (patch) | |
| tree | c8de7f4ea1c076b3e3bbc47eec2869fa0ff29bb4 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | f48e47be5fcd5d51a4001caa05f429cf92b4a8ed (diff) | |
Use GetParentItem where applicable
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 0c1018499..5b926b0f4 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2462,19 +2462,14 @@ namespace Emby.Server.Implementations.Library public BaseItem GetParentItem(string parentId, Guid? userId) { - if (!string.IsNullOrEmpty(parentId)) + if (string.IsNullOrEmpty(parentId)) { - return GetItemById(new Guid(parentId)); + return GetParentItem((Guid?)null, userId); } - if (userId.HasValue && userId != Guid.Empty) - { - return GetUserRootFolder(); - } - - return RootFolder; + return GetParentItem(new Guid(parentId), userId); } - + public BaseItem GetParentItem(Guid? parentId, Guid? userId) { if (parentId.HasValue) |
