update CollectionFolder

This commit is contained in:
Luke Pulverenti
2016-04-27 13:53:23 -04:00
parent 1e16ac9f2a
commit 6c62c20a9e
5 changed files with 30 additions and 8 deletions

View File

@@ -663,7 +663,7 @@ namespace MediaBrowser.Server.Implementations.IO
while (item == null && !string.IsNullOrEmpty(path))
{
item = LibraryManager.FindByPath(path);
item = LibraryManager.FindByPath(path, null);
path = Path.GetDirectoryName(path);
}

View File

@@ -801,11 +801,12 @@ namespace MediaBrowser.Server.Implementations.Library
return _userRootFolder;
}
public BaseItem FindByPath(string path)
public BaseItem FindByPath(string path, bool? isFolder)
{
var query = new InternalItemsQuery
{
Path = path
Path = path,
IsFolder = isFolder
};
// Only use the database result if there's exactly one item, otherwise we run the risk of returning old data that hasn't been cleaned yet.