add mediabrowser route back for now
This commit is contained in:
parent
b086f6d330
commit
ab7e697f30
|
@ -278,7 +278,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
_logger.LogWarning("Error disposing connection");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -603,7 +603,14 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
Summary = route.Summary
|
Summary = route.Summary
|
||||||
});
|
});
|
||||||
|
|
||||||
routes.Add(new RouteAttribute(NormalizeOldRoutePath(route.Path), route.Verbs)
|
routes.Add(new RouteAttribute(NormalizeEmbyRoutePath(route.Path), route.Verbs)
|
||||||
|
{
|
||||||
|
Notes = route.Notes,
|
||||||
|
Priority = route.Priority,
|
||||||
|
Summary = route.Summary
|
||||||
|
});
|
||||||
|
|
||||||
|
routes.Add(new RouteAttribute(NormalizeMediaBrowserRoutePath(route.Path), route.Verbs)
|
||||||
{
|
{
|
||||||
Notes = route.Notes,
|
Notes = route.Notes,
|
||||||
Priority = route.Priority,
|
Priority = route.Priority,
|
||||||
|
@ -645,7 +652,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
|
|
||||||
// this method was left for compatibility with third party clients
|
// this method was left for compatibility with third party clients
|
||||||
private static string NormalizeOldRoutePath(string path)
|
private static string NormalizeEmbyRoutePath(string path)
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
@ -655,6 +662,17 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
return "emby/" + path;
|
return "emby/" + path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this method was left for compatibility with third party clients
|
||||||
|
private static string NormalizeMediaBrowserRoutePath(string path)
|
||||||
|
{
|
||||||
|
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return "/mediabrowser" + path;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "mediabrowser/" + path;
|
||||||
|
}
|
||||||
|
|
||||||
private static string NormalizeCustomRoutePath(string baseUrl, string path)
|
private static string NormalizeCustomRoutePath(string baseUrl, string path)
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user