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 { protected override Task GetObjectToSerialize() { string pluginName = QueryString["name"]; BasePluginConfiguration config = Kernel.Instance.Plugins.First(p => p.Name.Equals(pluginName, StringComparison.OrdinalIgnoreCase)).Configuration; return Task.FromResult(config); } } }