mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-28 03:34:46 +03:00
Set initial display media type at resolve time
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user