Set initial display media type at resolve time

This commit is contained in:
Luke Pulverenti
2013-06-13 14:17:42 -04:00
parent 7d0a478183
commit 8726b9ca95
10 changed files with 35 additions and 110 deletions

View File

@@ -569,7 +569,19 @@ namespace MediaBrowser.Server.Implementations.Library
// Add in the plug-in folders
foreach (var child in PluginFolderCreators)
{
rootFolder.AddVirtualChild(child.GetFolder());
var folder = child.GetFolder();
if (string.IsNullOrEmpty(folder.DisplayMediaType))
{
folder.DisplayMediaType = "CollectionFolder";
}
if (folder.Id == Guid.Empty)
{
folder.Id = (folder.Path ?? folder.Name ?? folder.GetType().Name).GetMBId(folder.GetType());
}
rootFolder.AddVirtualChild(folder);
}
return rootFolder;