diff options
| author | crobibero <cody@robibe.ro> | 2020-11-09 14:57:02 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-09 14:57:02 -0700 |
| commit | 6748ba287d8cd9054072ce1ffc51c7aa8690e108 (patch) | |
| tree | 5b859fa356ef2f6abd5fb281ff5655ccf5fd3ebf /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | f8e6edbfeb8c437c2ed0a9c9b44bed0fc105b2c2 (diff) | |
| parent | 296e534f670df9069e8cb50683a964ea2a5cdc37 (diff) | |
Merge remote-tracking branch 'upstream/master' into query-fields
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 00282b71a..f16eda1ec 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2440,6 +2440,21 @@ namespace Emby.Server.Implementations.Library new SubtitleResolver(BaseItem.LocalizationManager).AddExternalSubtitleStreams(streams, videoPath, streams.Count, files); } + public BaseItem GetParentItem(string parentId, Guid? userId) + { + if (!string.IsNullOrEmpty(parentId)) + { + return GetItemById(new Guid(parentId)); + } + + if (userId.HasValue && userId != Guid.Empty) + { + return GetUserRootFolder(); + } + + return RootFolder; + } + /// <inheritdoc /> public bool IsVideoFile(string path) { |
