From 441301069e8e03070e1f024c41ebadfcff88e3ba Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 11 Sep 2020 12:56:11 +0200 Subject: [PATCH] Fix --- Emby.Server.Implementations/Library/LibraryManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 6e7970e014..cfa714f236 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(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(string path)