mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 10:43:30 +01:00
update name searching
This commit is contained in:
@@ -933,21 +933,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
Path.Combine(path, validFilename) :
|
||||
Path.Combine(path, subFolderPrefix, validFilename);
|
||||
|
||||
var id = GetNewItemId(fullPath, type);
|
||||
|
||||
BaseItem obj;
|
||||
|
||||
if (!_libraryItemsCache.TryGetValue(id, out obj))
|
||||
{
|
||||
obj = CreateItemByName<T>(fullPath, name, id);
|
||||
|
||||
RegisterItem(id, obj);
|
||||
}
|
||||
|
||||
return obj as T;
|
||||
return CreateItemByName<T>(fullPath, name);
|
||||
}
|
||||
|
||||
private T CreateItemByName<T>(string path, string name, Guid id)
|
||||
private T CreateItemByName<T>(string path, string name)
|
||||
where T : BaseItem, new()
|
||||
{
|
||||
var isArtist = typeof(T) == typeof(MusicArtist);
|
||||
@@ -970,6 +959,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
}
|
||||
}
|
||||
|
||||
var id = GetNewItemId(path, typeof(T));
|
||||
|
||||
var item = GetItemById(id) as T;
|
||||
|
||||
if (item == null)
|
||||
|
||||
Reference in New Issue
Block a user