jellyfin-server/MediaBrowser.Api/HttpHandlers/PluginConfigurationHandler.cs

22 lines
739 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
{
2012-09-02 05:30:25 +00:00
public class PluginConfigurationHandler : BaseSerializationHandler<BasePluginConfiguration>
{
protected override Task<BasePluginConfiguration> GetObjectToSerialize()
{
2012-09-03 21:56:30 +00:00
string name = QueryString["assemblyfilename"];
2012-09-03 21:56:30 +00:00
BasePluginConfiguration config = Kernel.Instance.Plugins.First(p => p.AssemblyFileName.Equals(name, StringComparison.OrdinalIgnoreCase)).Configuration;
2012-08-22 02:50:59 +00:00
return Task.FromResult<BasePluginConfiguration>(config);
}
}
}