2012-07-12 08:55:27 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Reactive.Linq;
|
2012-07-21 20:39:47 +02:00
|
|
|
|
using MediaBrowser.Common.Net.Handlers;
|
2012-07-12 08:55:27 +02:00
|
|
|
|
using MediaBrowser.Common.Plugins;
|
|
|
|
|
using MediaBrowser.Controller;
|
2012-07-14 22:45:11 +02:00
|
|
|
|
using MediaBrowser.HtmlBrowser.Handlers;
|
2012-07-12 08:55:27 +02:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.HtmlBrowser
|
|
|
|
|
{
|
|
|
|
|
public class Plugin : BasePlugin<BasePluginConfiguration>
|
|
|
|
|
{
|
|
|
|
|
protected override void InitInternal()
|
|
|
|
|
{
|
2012-07-13 05:50:50 +02:00
|
|
|
|
var httpServer = Kernel.Instance.HttpServer;
|
|
|
|
|
|
2012-07-20 04:22:44 +02:00
|
|
|
|
/*httpServer.Where(ctx => ctx.LocalPath.IndexOf("/browser/", StringComparison.OrdinalIgnoreCase) != -1).Subscribe(ctx =>
|
2012-07-14 22:45:11 +02:00
|
|
|
|
{
|
|
|
|
|
string localPath = ctx.LocalPath;
|
|
|
|
|
string srch = "/browser/";
|
2012-07-13 05:50:50 +02:00
|
|
|
|
|
2012-07-14 22:45:11 +02:00
|
|
|
|
int index = localPath.IndexOf(srch, StringComparison.OrdinalIgnoreCase);
|
2012-07-13 05:50:50 +02:00
|
|
|
|
|
2012-07-14 22:45:11 +02:00
|
|
|
|
string resource = localPath.Substring(index + srch.Length);
|
|
|
|
|
|
|
|
|
|
ctx.Respond(new EmbeddedResourceHandler(ctx, resource));
|
|
|
|
|
|
2012-07-20 04:22:44 +02:00
|
|
|
|
});*/
|
2012-07-12 08:55:27 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|