update aliases
This commit is contained in:
parent
9dc8f8ac44
commit
da3d8894a8
|
@ -710,12 +710,19 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
Summary = route.Summary
|
Summary = route.Summary
|
||||||
});
|
});
|
||||||
|
|
||||||
routes.Add(new RouteAttribute(DoubleNormalizeEmbyRoutePath(route.Path), route.Verbs)
|
routes.Add(new RouteAttribute(NormalizeMediaBrowserRoutePath(route.Path), route.Verbs)
|
||||||
{
|
{
|
||||||
Notes = route.Notes,
|
Notes = route.Notes,
|
||||||
Priority = route.Priority,
|
Priority = route.Priority,
|
||||||
Summary = route.Summary
|
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);
|
return routes.ToArray(routes.Count);
|
||||||
|
@ -756,6 +763,16 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
return "emby/" + path;
|
return "emby/" + path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string NormalizeMediaBrowserRoutePath(string path)
|
||||||
|
{
|
||||||
|
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return "/mediabrowser" + path;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "mediabrowser/" + path;
|
||||||
|
}
|
||||||
|
|
||||||
private string DoubleNormalizeEmbyRoutePath(string path)
|
private string DoubleNormalizeEmbyRoutePath(string path)
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user