The Free Software Media System - Server Backend & API
keep old base url for now
dkanada97d6c2db6b57
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.csindex 48b229e88a..bdcf5d0b7c 100644--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs@@ -602,6 +602,13 @@ namespace Emby.Server.Implementations.HttpServerPriority = route.Priority,Summary = route.Summary});++ routes.Add(new RouteAttribute(NormalizeOldRoutePath(route.Path), route.Verbs)+ {+ Notes = route.Notes,+ Priority = route.Priority,+ Summary = route.Summary+ });}return routes.ToArray();@@ -637,6 +644,17 @@ namespace Emby.Server.Implementations.HttpServerreturn _socketListener.ProcessWebSocketRequest(context);}+ // this method was left for compatibility with third party clients+ private static string NormalizeOldRoutePath(string path)+ {+ if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))+ {+ return "/emby" + path;+ }++ return "emby/" + path;+ }+private static string NormalizeCustomRoutePath(string baseUrl, string path){if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))