mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-06-29 10:23:36 +02:00
Fix
This commit is contained in:
parent
15be11fca8
commit
441301069e
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue