diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-09-11 12:56:11 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-09-11 12:56:11 +0200 |
| commit | 441301069e8e03070e1f024c41ebadfcff88e3ba (patch) | |
| tree | 368113a687f629e0f3f8a7693c13fc84cb49ed7b | |
| parent | 15be11fca833ff496d4aceac07c9bbe6b202beb9 (diff) | |
Fix
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 6e7970e01..cfa714f23 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -960,8 +960,9 @@ namespace Emby.Server.Implementations.Library var path = getPathFn(name); var id = GetItemByNameId<T>(path); + var item = GetItemById(id) as T; - if (GetItemById(id) is T item) + if (item == null) { item = new T { @@ -977,7 +978,7 @@ namespace Emby.Server.Implementations.Library return item; } - return null; + return item; } private Guid GetItemByNameId<T>(string path) |
