mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-03 04:42:52 +01:00
a few more async optimizations
This commit is contained in:
parent
1c5f728ec2
commit
fbf8cc833c
@@ -14,27 +14,24 @@ namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
protected override Task<IEnumerable<PluginInfo>> GetObjectToSerialize()
|
||||
{
|
||||
return Task.Run(() =>
|
||||
var plugins = Kernel.Instance.Plugins.Select(p =>
|
||||
{
|
||||
var plugins = Kernel.Instance.Plugins.Select(p =>
|
||||
return new PluginInfo()
|
||||
{
|
||||
return new PluginInfo()
|
||||
{
|
||||
Path = p.Path,
|
||||
Name = p.Name,
|
||||
Enabled = p.Enabled,
|
||||
DownloadToUI = p.DownloadToUI,
|
||||
Version = p.Version
|
||||
};
|
||||
});
|
||||
|
||||
if (QueryString["uionly"] == "1")
|
||||
{
|
||||
plugins = plugins.Where(p => p.DownloadToUI);
|
||||
}
|
||||
|
||||
return plugins;
|
||||
Path = p.Path,
|
||||
Name = p.Name,
|
||||
Enabled = p.Enabled,
|
||||
DownloadToUI = p.DownloadToUI,
|
||||
Version = p.Version
|
||||
};
|
||||
});
|
||||
|
||||
if (QueryString["uionly"] == "1")
|
||||
{
|
||||
plugins = plugins.Where(p => p.DownloadToUI);
|
||||
}
|
||||
|
||||
return Task.FromResult<IEnumerable<PluginInfo>>(plugins);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user