aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Updates/InstallationManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-10-20 12:19:03 -0400
committerGitHub <noreply@github.com>2017-10-20 12:19:03 -0400
commit9b383f6b1ad57489c71e4d81d9c831d3d5960f10 (patch)
tree87fc46c77646967dbb88f49538531a81004f9a7b /Emby.Server.Implementations/Updates/InstallationManager.cs
parent93a0244b7aee9d850dfa48762e64348a3c864ef5 (diff)
parent0cf4f01dc72b3775e3af067ed1eef51c683a3c02 (diff)
Merge pull request #2965 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Updates/InstallationManager.cs')
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index 772f2338a..51acfee88 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -175,13 +175,24 @@ namespace Emby.Server.Implementations.Updates
{ "systemid", _applicationHost.SystemId }
};
- using (var json = await _httpClient.Post("https://www.mb3admin.com/admin/service/package/retrieveall?includeAllRuntimes=true", data, cancellationToken).ConfigureAwait(false))
+ var options = new HttpRequestOptions
{
- cancellationToken.ThrowIfCancellationRequested();
+ Url = "https://www.mb3admin.com/admin/service/package/retrieveall?includeAllRuntimes=true",
+ CancellationToken = cancellationToken
+ };
+
+ options.SetPostData(data);
+
+ using (var response = await _httpClient.SendAsync(options, "POST").ConfigureAwait(false))
+ {
+ using (var json = response.Content)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
- var packages = _jsonSerializer.DeserializeFromStream<PackageInfo[]>(json);
+ var packages = _jsonSerializer.DeserializeFromStream<PackageInfo[]>(json);
- return FilterPackages(packages, packageType, applicationVersion);
+ return FilterPackages(packages, packageType, applicationVersion);
+ }
}
}
else