2012-07-24 14:54:34 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
2012-08-19 20:38:31 +00:00
|
|
|
|
using System.Threading.Tasks;
|
2012-08-15 13:20:29 +00:00
|
|
|
|
using MediaBrowser.Common.Net.Handlers;
|
2012-07-24 14:54:34 +00:00
|
|
|
|
using MediaBrowser.Controller;
|
2012-08-17 13:16:50 +00:00
|
|
|
|
using MediaBrowser.Model.Plugins;
|
2012-07-24 14:54:34 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Api.HttpHandlers
|
|
|
|
|
{
|
2012-09-02 05:30:25 +00:00
|
|
|
|
public class PluginConfigurationHandler : BaseSerializationHandler<BasePluginConfiguration>
|
2012-07-24 14:54:34 +00:00
|
|
|
|
{
|
2012-08-19 20:38:31 +00:00
|
|
|
|
protected override Task<BasePluginConfiguration> GetObjectToSerialize()
|
2012-07-24 14:54:34 +00:00
|
|
|
|
{
|
2012-08-22 02:50:59 +00:00
|
|
|
|
string pluginName = QueryString["name"];
|
2012-07-24 14:54:34 +00:00
|
|
|
|
|
2012-08-22 02:50:59 +00:00
|
|
|
|
BasePluginConfiguration config = Kernel.Instance.Plugins.First(p => p.Name.Equals(pluginName, StringComparison.OrdinalIgnoreCase)).Configuration;
|
|
|
|
|
|
|
|
|
|
return Task.FromResult<BasePluginConfiguration>(config);
|
2012-07-24 14:54:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|