|
|
|
@ -23,21 +23,6 @@ namespace MediaBrowser.Api
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class GetPluginAssembly
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Route("/Plugins/{Id}/Assembly", "GET")]
|
|
|
|
|
[Api(("Gets a plugin assembly file"))]
|
|
|
|
|
public class GetPluginAssembly
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the id.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The id.</value>
|
|
|
|
|
[ApiMember(Name = "Id", Description = "Plugin Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class UninstallPlugin
|
|
|
|
|
/// </summary>
|
|
|
|
@ -89,21 +74,6 @@ namespace MediaBrowser.Api
|
|
|
|
|
public Stream RequestStream { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class GetPluginConfigurationFile
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Route("/Plugins/{Id}/ConfigurationFile", "GET")]
|
|
|
|
|
[Api(("Gets a plugin's configuration file, in plain text"))]
|
|
|
|
|
public class GetPluginConfigurationFile
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the id.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The id.</value>
|
|
|
|
|
[ApiMember(Name = "Id", Description = "Plugin Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class GetPluginSecurityInfo
|
|
|
|
|
/// </summary>
|
|
|
|
@ -201,18 +171,6 @@ namespace MediaBrowser.Api
|
|
|
|
|
return ToOptimizedResult(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the specified request.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The request.</param>
|
|
|
|
|
/// <returns>System.Object.</returns>
|
|
|
|
|
public object Get(GetPluginAssembly request)
|
|
|
|
|
{
|
|
|
|
|
var plugin = _appHost.Plugins.First(p => p.Id == request.Id);
|
|
|
|
|
|
|
|
|
|
return ResultFactory.GetStaticFileResult(RequestContext, plugin.AssemblyFilePath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the specified request.
|
|
|
|
|
/// </summary>
|
|
|
|
@ -229,18 +187,6 @@ namespace MediaBrowser.Api
|
|
|
|
|
return ToOptimizedResultUsingCache(cacheKey, dateModified, null, () => plugin.Configuration);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the specified request.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The request.</param>
|
|
|
|
|
/// <returns>System.Object.</returns>
|
|
|
|
|
public object Get(GetPluginConfigurationFile request)
|
|
|
|
|
{
|
|
|
|
|
var plugin = _appHost.Plugins.First(p => p.Id == request.Id);
|
|
|
|
|
|
|
|
|
|
return ResultFactory.GetStaticFileResult(RequestContext, plugin.ConfigurationFilePath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the specified request.
|
|
|
|
|
/// </summary>
|
|
|
|
|