diff options
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
| -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) |
