From 57912ab86de69a8c90dc8de90b51ab91a47c34dc Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 9 Mar 2014 00:22:35 -0800 Subject: [PATCH] Fixed update test, send os when requesting update packages --- src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs | 2 +- src/NzbDrone.Core/Update/UpdatePackageProvider.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs index 810dc8661..f02a8368d 100644 --- a/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs +++ b/src/NzbDrone.Core.Test/UpdateTests/UpdateServiceFixture.cs @@ -24,7 +24,7 @@ namespace NzbDrone.Core.Test.UpdateTests private readonly UpdatePackage _updatePackage = new UpdatePackage { FileName = "NzbDrone.develop.2.0.0.zip", - Url = "http://update.nzbdrone.com/v2/develop/NzbDrone.develop.zip", + Url = "http://update.nzbdrone.com/v2/develop/windows/NzbDrone.develop.zip", Version = new Version("2.0.0") }; diff --git a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs index e95d4c6fa..0b436adfb 100644 --- a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs +++ b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs @@ -22,6 +22,7 @@ namespace NzbDrone.Core.Update var request = new RestRequest("/v1/update/{branch}"); request.AddParameter("version", currentVersion); + request.AddParameter("os", OsInfo.Os.ToString().ToLowerInvariant()); request.AddUrlSegment("branch", branch); var update = restClient.ExecuteAndValidate(request); @@ -38,6 +39,7 @@ namespace NzbDrone.Core.Update var request = new RestRequest("/v1/update/{branch}/changes"); request.AddParameter("majorVersion", BuildInfo.Version.Major); + request.AddParameter("os", OsInfo.Os.ToString().ToLowerInvariant()); request.AddUrlSegment("branch", branch); var updates = restClient.ExecuteAndValidate>(request);