pull/2008/head
Bond-009 5 years ago
parent b14d6d0417
commit aea4ef9471

@ -298,12 +298,24 @@ namespace MediaBrowser.Api
var pathInfo = Parse(Request.PathInfo);
var first = pathInfo[0];
string baseUrl = ApiEntryPoint.Instance.ConfigurationManager.Configuration.BaseUrl;
// backwards compatibility
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase)
|| string.Equals(first, ApiEntryPoint.Instance.ConfigurationManager.Configuration.BaseUrl))
if (baseUrl.Length == 0
&& (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase)))
{
index++;
}
else if (string.Equals(first, baseUrl))
{
index++;
var second = pathInfo[1];
if (string.Equals(second, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|| string.Equals(second, "emby", StringComparison.OrdinalIgnoreCase))
{
index++;
}
}
return pathInfo[index];

Loading…
Cancel
Save