1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-01-18 21:52:10 +00:00

Handle 1.1x version from Sabnzbd

This commit is contained in:
Mark McDowall 2016-02-16 23:49:13 -08:00
parent 974a7276c3
commit 7cb1e91ba1
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -29,7 +29,8 @@ public Sabnzbd(ISabnzbdProxy proxy,
_proxy = proxy; _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) protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent)
{ {