sync updates

This commit is contained in:
Luke Pulverenti
2015-02-18 23:37:44 -05:00
parent 8497c2926f
commit d451386f5d
13 changed files with 124 additions and 11 deletions

View File

@@ -380,6 +380,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer
Priority = route.Priority,
Summary = route.Summary
});
// TODO: This is a hack for iOS. Remove it asap.
routes.Add(new RouteAttribute(DoubleNormalizeRoutePath(route.Path), route.Verbs)
{
Notes = route.Notes,
Priority = route.Priority,
Summary = route.Summary
});
}
return routes.ToArray();
@@ -395,6 +403,16 @@ namespace MediaBrowser.Server.Implementations.HttpServer
return "mediabrowser/" + path;
}
private string DoubleNormalizeRoutePath(string path)
{
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
{
return "/mediabrowser/mediabrowser" + path;
}
return "mediabrowser//mediabrowser" + path;
}
/// <summary>
/// Releases the specified instance.
/// </summary>