mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Fix logic
This commit is contained in:
parent
b14d6d0417
commit
aea4ef9471
@ -298,13 +298,25 @@ 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…
Reference in New Issue
Block a user