diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-07-24 10:54:34 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-07-24 10:54:34 -0400 |
| commit | 84af205572e6ab9ca3e10f6de33cbce278e01335 (patch) | |
| tree | 0cb89ab3a9d3ff67f85894096e592a959c3ff9b0 /MediaBrowser.Api/Plugin.cs | |
| parent | 6c7175e33d258ff2e65735f68cb05f110a8d2306 (diff) | |
Added new api handlers to get plugin information
Diffstat (limited to 'MediaBrowser.Api/Plugin.cs')
| -rw-r--r-- | MediaBrowser.Api/Plugin.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Plugin.cs b/MediaBrowser.Api/Plugin.cs index 6c2e9df7e..6ced7a704 100644 --- a/MediaBrowser.Api/Plugin.cs +++ b/MediaBrowser.Api/Plugin.cs @@ -5,12 +5,18 @@ using MediaBrowser.Common.Net; using MediaBrowser.Common.Net.Handlers;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Controller;
+using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Api
{
- public class Plugin : BasePlugin<BasePluginConfiguration>
+ public class Plugin : BaseGenericPlugin<BasePluginConfiguration>
{
- protected override void InitInternal()
+ public override string Name
+ {
+ get { return "WebAPI"; }
+ }
+
+ public override void InitInServer()
{
var httpServer = Kernel.Instance.HttpServer;
@@ -43,10 +49,6 @@ namespace MediaBrowser.Api {
handler = new UsersHandler();
}
- else if (localPath.EndsWith("/api/media", StringComparison.OrdinalIgnoreCase))
- {
- handler = new MediaHandler();
- }
else if (localPath.EndsWith("/api/genre", StringComparison.OrdinalIgnoreCase))
{
handler = new GenreHandler();
@@ -75,6 +77,14 @@ namespace MediaBrowser.Api {
handler = new UserConfigurationHandler();
}
+ else if (localPath.EndsWith("/api/plugins", StringComparison.OrdinalIgnoreCase))
+ {
+ handler = new PluginsHandler();
+ }
+ else if (localPath.EndsWith("/api/pluginconfiguration", StringComparison.OrdinalIgnoreCase))
+ {
+ handler = new PluginConfigurationHandler();
+ }
if (handler != null)
{
|
