optimize FindByPath

This commit is contained in:
Luke Pulverenti
2016-03-01 14:39:46 -05:00
parent 177cc41e3d
commit 076a07a546
7 changed files with 40 additions and 2 deletions

View File

@@ -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)
{

View File

@@ -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; }

View File

@@ -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>