|
|
@ -45,10 +45,10 @@ namespace Emby.Dlna.PlayTo
|
|
|
|
cancellationToken)
|
|
|
|
cancellationToken)
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
|
|
|
|
await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
|
|
|
|
using var reader = new StreamReader(stream, Encoding.UTF8);
|
|
|
|
return await XDocument.LoadAsync(
|
|
|
|
return XDocument.Parse(
|
|
|
|
stream,
|
|
|
|
await reader.ReadToEndAsync().ConfigureAwait(false),
|
|
|
|
LoadOptions.PreserveWhitespace,
|
|
|
|
LoadOptions.PreserveWhitespace);
|
|
|
|
cancellationToken).ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string NormalizeServiceUrl(string baseUrl, string serviceUrl)
|
|
|
|
private static string NormalizeServiceUrl(string baseUrl, string serviceUrl)
|
|
|
@ -94,10 +94,10 @@ namespace Emby.Dlna.PlayTo
|
|
|
|
options.Headers.TryAddWithoutValidation("FriendlyName.DLNA.ORG", FriendlyName);
|
|
|
|
options.Headers.TryAddWithoutValidation("FriendlyName.DLNA.ORG", FriendlyName);
|
|
|
|
using var response = await _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
|
|
|
|
using var response = await _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
|
|
|
|
await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
|
|
|
|
await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
|
|
|
|
using var reader = new StreamReader(stream, Encoding.UTF8);
|
|
|
|
return await XDocument.LoadAsync(
|
|
|
|
return XDocument.Parse(
|
|
|
|
stream,
|
|
|
|
await reader.ReadToEndAsync().ConfigureAwait(false),
|
|
|
|
LoadOptions.PreserveWhitespace,
|
|
|
|
LoadOptions.PreserveWhitespace);
|
|
|
|
cancellationToken).ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async Task<HttpResponseMessage> PostSoapDataAsync(
|
|
|
|
private async Task<HttpResponseMessage> PostSoapDataAsync(
|
|
|
|