diff options
Diffstat (limited to 'MediaBrowser.Api/HttpHandlers/PluginAssemblyHandler.cs')
| -rw-r--r-- | MediaBrowser.Api/HttpHandlers/PluginAssemblyHandler.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/MediaBrowser.Api/HttpHandlers/PluginAssemblyHandler.cs b/MediaBrowser.Api/HttpHandlers/PluginAssemblyHandler.cs new file mode 100644 index 000000000..9e98f012d --- /dev/null +++ b/MediaBrowser.Api/HttpHandlers/PluginAssemblyHandler.cs @@ -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);
+ }
+ }
+}
|
