mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 10:58:44 +01:00
optimize FindByPath
This commit is contained in:
@@ -1359,7 +1359,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
if (!string.IsNullOrEmpty(info.Path))
|
||||
{
|
||||
var itemByPath = LibraryManager.RootFolder.FindByPath(info.Path);
|
||||
var itemByPath = LibraryManager.FindByPath(info.Path);
|
||||
|
||||
if (itemByPath == null)
|
||||
{
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
public string NameLessThan { get; set; }
|
||||
public string NameContains { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public string Person { get; set; }
|
||||
public string[] PersonIds { get; set; }
|
||||
public string[] ItemIds { get; set; }
|
||||
|
||||
@@ -56,6 +56,13 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <returns>Task{Person}.</returns>
|
||||
Person GetPerson(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the by path.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns>BaseItem.</returns>
|
||||
BaseItem FindByPath(string path);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the artist.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user