diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-09-02 21:44:02 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-09-02 21:44:02 -0400 |
| commit | da3d8894a8574c9ec3d2ce122a9f60ab2b04511d (patch) | |
| tree | df51416598761608b4e447cbfcd4f2fd303164ed | |
| parent | 9dc8f8ac441600128e500e45c0ff8d5aace34459 (diff) | |
update aliases
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index a9ce51324..482bd9a32 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -710,12 +710,19 @@ namespace Emby.Server.Implementations.HttpServer Summary = route.Summary }); - routes.Add(new RouteAttribute(DoubleNormalizeEmbyRoutePath(route.Path), route.Verbs) + routes.Add(new RouteAttribute(NormalizeMediaBrowserRoutePath(route.Path), route.Verbs) { Notes = route.Notes, Priority = route.Priority, Summary = route.Summary }); + + //routes.Add(new RouteAttribute(DoubleNormalizeEmbyRoutePath(route.Path), route.Verbs) + //{ + // Notes = route.Notes, + // Priority = route.Priority, + // Summary = route.Summary + //}); } return routes.ToArray(routes.Count); @@ -756,6 +763,16 @@ namespace Emby.Server.Implementations.HttpServer return "emby/" + path; } + private string NormalizeMediaBrowserRoutePath(string path) + { + if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase)) + { + return "/mediabrowser" + path; + } + + return "mediabrowser/" + path; + } + private string DoubleNormalizeEmbyRoutePath(string path) { if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase)) |
