diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2020-11-08 10:22:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-08 10:22:18 +0100 |
| commit | ec2538a1ba7d3658eba7e44a4b1b961f33d7ceda (patch) | |
| tree | 6d83044cd2c56e2c315ddd1a948d183d6ae60b98 /Emby.Server.Implementations/Library/LibraryManager.cs | |
| parent | 1823cbb0261ce8388fd39078c77de89990ed2437 (diff) | |
| parent | b693c52fe7f2fda6ea009c3ee8c032189369d896 (diff) | |
Merge pull request #4420 from cvium/fix_person_studio_genre_endpoints
Fix Persons, Genres and Studios endpoints
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) { |
