aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-08-22 16:48:22 -0400
committerGitHub <noreply@github.com>2016-08-22 16:48:22 -0400
commit25400d89a9826e33e738fb04d3d1878feb769e05 (patch)
treecfcb100da98923faedd0ea98d65a5c8694382236 /MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
parenta9c084630d8dcfe3f12a28fa42904a1394165913 (diff)
parent430b187ef6b7d550e9ade89dd0254c5d1448a77a (diff)
Merge pull request #2088 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
index 633208739..51a53fe21 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -428,8 +428,24 @@ namespace MediaBrowser.Server.Implementations.HttpServer
if (string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase) ||
string.Equals(localPath, "/mediabrowser", StringComparison.OrdinalIgnoreCase) ||
- localPath.IndexOf("mediabrowser/web", StringComparison.OrdinalIgnoreCase) != -1 ||
- localPath.IndexOf("dashboard/", StringComparison.OrdinalIgnoreCase) != -1)
+ localPath.IndexOf("mediabrowser/web", StringComparison.OrdinalIgnoreCase) != -1)
+ {
+ httpRes.StatusCode = 200;
+ httpRes.ContentType = "text/html";
+ var newUrl = urlString.Replace("mediabrowser", "emby", StringComparison.OrdinalIgnoreCase)
+ .Replace("/dashboard/", "/web/", StringComparison.OrdinalIgnoreCase);
+
+ if (!string.Equals(newUrl, urlString, StringComparison.OrdinalIgnoreCase))
+ {
+ httpRes.Write("<!doctype html><html><head><title>Emby</title></head><body>Please update your Emby bookmark to <a href=\"" + newUrl + "\">" + newUrl + "</a></body></html>");
+
+ httpRes.Close();
+ return;
+ }
+ }
+
+ if (localPath.IndexOf("dashboard/", StringComparison.OrdinalIgnoreCase) != -1 &&
+ localPath.IndexOf("web/dashboard", StringComparison.OrdinalIgnoreCase) == -1)
{
httpRes.StatusCode = 200;
httpRes.ContentType = "text/html";