Added Nzbget version check for 12.0 or higher.
This commit is contained in:
parent
db4746bef7
commit
93c6047cd5
|
@ -254,7 +254,12 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_proxy.GetVersion(Settings);
|
var version = _proxy.GetVersion(Settings);
|
||||||
|
|
||||||
|
if (Version.Parse(version) < Version.Parse("12.0"))
|
||||||
|
{
|
||||||
|
return new ValidationFailure(string.Empty, "Nzbget version too low, need 12.0 or higher");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||||
{
|
{
|
||||||
var request = BuildRequest(new JsonRequest("version"));
|
var request = BuildRequest(new JsonRequest("version"));
|
||||||
|
|
||||||
return Json.Deserialize<NzbgetResponse<String>>(ProcessRequest(request, settings)).Version;
|
return Json.Deserialize<NzbgetResponse<String>>(ProcessRequest(request, settings)).Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<String, String> GetConfig(NzbgetSettings settings)
|
public Dictionary<String, String> GetConfig(NzbgetSettings settings)
|
||||||
|
|
Loading…
Reference in New Issue