dlna GetPathValue

Forgot to update this last time, just copied the code from `MediaBrowser.Api/BaseApiService.cs`
This commit is contained in:
Bond-009 2019-11-25 10:56:23 +01:00 committed by GitHub
parent e7098f1997
commit 69d76af054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,11 +214,13 @@ namespace Emby.Dlna.Api
string baseUrl = _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)))
{
@ -234,7 +236,7 @@ namespace Emby.Dlna.Api
return pathInfo[index];
}
private List<string> Parse(string pathUri)
private static string[] Parse(string pathUri)
{
var actionParts = pathUri.Split(new[] { "://" }, StringSplitOptions.None);
@ -248,7 +250,7 @@ namespace Emby.Dlna.Api
var args = pathInfo.Split('/');
return args.Skip(1).ToList();
return args.Skip(1).ToArray();
}
public object Get(GetIcon request)