Implemented UI plugin downloading
This commit is contained in:
parent
4500f1d11b
commit
26aef6b082
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net.Handlers;
|
||||
using MediaBrowser.Controller;
|
||||
|
||||
namespace MediaBrowser.Api.HttpHandlers
|
||||
{
|
||||
class PluginAssemblyHandler : BaseHandler
|
||||
{
|
||||
public override Task<string> GetContentType()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override Task WriteResponseToOutputStream(Stream stream)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override Task ProcessRequest(HttpListenerContext ctx)
|
||||
{
|
||||
string filename = ctx.Request.QueryString["assemblyfilename"];
|
||||
|
||||
string path = Path.Combine(Kernel.Instance.ApplicationPaths.PluginsPath, filename);
|
||||
|
||||
return new StaticFileHandler() { Path = path }.ProcessRequest(ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,8 @@ namespace MediaBrowser.Api.HttpHandlers
|
||||
Name = p.Name,
|
||||
Enabled = p.Enabled,
|
||||
DownloadToUI = p.DownloadToUI,
|
||||
Version = p.Version.ToString()
|
||||
Version = p.Version.ToString(),
|
||||
AssemblyFileName = p.AssemblyFileName
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user