blob: 63797026d742cf8a8c51e15b3366b1c7c561297c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
using System.Linq;
using MediaBrowser.Controller;
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Api.HttpHandlers
{
/// <summary>
/// Provides information about installed plugins
/// </summary>
public class PluginsHandler : JsonHandler
{
protected override object ObjectToSerialize
{
get
{
var plugins = Kernel.Instance.Plugins.Select(p =>
{
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;
}
}
}
}
|