Merge pull request #2045 from Bond-009/baseurlfix2

Fix baseurl issues part 2
This commit is contained in:
Joshua M. Boniface 2019-11-24 13:25:52 -05:00 committed by GitHub
commit db581c4d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -300,11 +300,13 @@ namespace MediaBrowser.Api
string baseUrl = ApiEntryPoint.Instance.ConfigurationManager.Configuration.BaseUrl;
// backwards compatibility
if (baseUrl.Length == 0
&& (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase)))
if (baseUrl.Length == 0)
{
index++;
if (string.Equals(first, "mediabrowser", StringComparison.OrdinalIgnoreCase)
|| string.Equals(first, "emby", StringComparison.OrdinalIgnoreCase))
{
index++;
}
}
else if (string.Equals(first, baseUrl.Remove(0, 1)))
{