Handle 1.1x version from Sabnzbd

pull/1158/merge
Mark McDowall 9 years ago
parent 974a7276c3
commit 7cb1e91ba1

@ -402,6 +402,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
[TestCase("0.8.0", true)]
[TestCase("1.0.0", true)]
[TestCase("1.0.0RC1", true)]
[TestCase("1.1.x", true)]
public void should_test_version(string version, bool expected)
{
Mocker.GetMock<ISabnzbdProxy>()

@ -29,7 +29,8 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
_proxy = proxy;
}
private static readonly Regex VersionRegex = new Regex(@"(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<candidate>.*)", RegexOptions.Compiled);
// patch can be a number (releases) or 'x' (git)
private static readonly Regex VersionRegex = new Regex(@"(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+|x)(?<candidate>.*)", RegexOptions.Compiled);
protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent)
{

Loading…
Cancel
Save