diff options
| author | crobibero <cody@robibe.ro> | 2020-12-01 11:07:41 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-12-01 11:07:41 -0700 |
| commit | c083b29e292c72b65929ea05639e3b5a8a401037 (patch) | |
| tree | 68c48427a88ade6acdef401aff3a03324099273d /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | f660969e6c5bd3fc8b3898277e1f8d23d557816e (diff) | |
Use Guid as API parameter type where possible
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 013781258..0c1018499 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2474,6 +2474,21 @@ namespace Emby.Server.Implementations.Library return RootFolder; } + + public BaseItem GetParentItem(Guid? parentId, Guid? userId) + { + if (parentId.HasValue) + { + return GetItemById(parentId.Value); + } + + if (userId.HasValue && userId != Guid.Empty) + { + return GetUserRootFolder(); + } + + return RootFolder; + } /// <inheritdoc /> public bool IsVideoFile(string path) |
