pull/4108/head
Bond_009 4 years ago
parent 15be11fca8
commit 441301069e

@ -960,8 +960,9 @@ namespace Emby.Server.Implementations.Library
var path = getPathFn(name); var path = getPathFn(name);
var id = GetItemByNameId<T>(path); var id = GetItemByNameId<T>(path);
var item = GetItemById(id) as T;
if (GetItemById(id) is T item) if (item == null)
{ {
item = new T item = new T
{ {
@ -977,7 +978,7 @@ namespace Emby.Server.Implementations.Library
return item; return item;
} }
return null; return item;
} }
private Guid GetItemByNameId<T>(string path) private Guid GetItemByNameId<T>(string path)

Loading…
Cancel
Save