aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/HttpHandlers/PluginsHandler.cs')
-rw-r--r--MediaBrowser.Api/HttpHandlers/PluginsHandler.cs31
1 files changed, 14 insertions, 17 deletions
diff --git a/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs b/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs
index f451832dd..1cb4e95f7 100644
--- a/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs
+++ b/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs
@@ -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
- };
- });
+ 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);
- }
+ if (QueryString["uionly"] == "1")
+ {
+ plugins = plugins.Where(p => p.DownloadToUI);
+ }
- return plugins;
- });
+ return Task.FromResult<IEnumerable<PluginInfo>>(plugins);
}
}
}