added play to config page

This commit is contained in:
Luke Pulverenti
2014-03-10 13:38:53 -04:00
parent 215776dce6
commit 38e5e32b42
10 changed files with 113 additions and 14 deletions

View File

@@ -81,7 +81,13 @@ namespace MediaBrowser.Server.Implementations.Collections
throw new ArgumentNullException("parentId");
}
return _libraryManager.GetItemById(parentId.Value) as Folder;
var folder = _libraryManager.GetItemById(parentId.Value) as Folder;
// Find an actual physical folder
if (folder is CollectionFolder)
{
return _libraryManager.RootFolder.Children.OfType<Folder>().First(i => folder.PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase));
}
}
return _libraryManager.RootFolder.Children.OfType<ManualCollectionsFolder>().FirstOrDefault() ??