jellyfin/MediaBrowser.Api/HttpHandlers/PluginConfigurationHandler.cs

22 lines
727 B
C#
Raw Normal View History

using System;
using System.Linq;
using System.Threading.Tasks;
using MediaBrowser.Common.Net.Handlers;
using MediaBrowser.Controller;
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Api.HttpHandlers
{
public class PluginConfigurationHandler : BaseSerializationHandler<BasePluginConfiguration>
{
protected override Task<BasePluginConfiguration> GetObjectToSerialize()
{
2012-08-22 02:50:59 +00:00
string pluginName = QueryString["name"];
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);
}
}
}