mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 02:22:31 +01:00
Releases with only extras will be skipped, with tests.
This commit is contained in:
parent
4604bbd821
commit
339f191ab8
@ -352,5 +352,15 @@ public void parse_size(string sizeString, long expectedSize)
|
||||
|
||||
result.Should().Be(expectedSize);
|
||||
}
|
||||
|
||||
[TestCase("Acropolis Now S05 EXTRAS DVDRip XviD RUNNER")]
|
||||
[TestCase("Punky Brewster S01 EXTRAS DVDRip XviD RUNNER")]
|
||||
[TestCase("Instant Star S03 EXTRAS DVDRip XviD OSiTV")]
|
||||
public void parse_season_extras(string postTitle)
|
||||
{
|
||||
var result = Parser.ParseTitle(postTitle);
|
||||
|
||||
result.Should().BeNull();
|
||||
}
|
||||
}
|
||||
}
|
@ -44,7 +44,7 @@ public static class Parser
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Supports Season only releases
|
||||
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))+\W?(?!\\)",
|
||||
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))\W(?<extras>EXTRAS)?(?!\\)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled)
|
||||
};
|
||||
|
||||
@ -135,6 +135,11 @@ internal static EpisodeParseResult ParseTitle(string title)
|
||||
|
||||
else
|
||||
{
|
||||
//Check to see if this is an "Extras" pack, if it is, return NULL
|
||||
//Todo: Set a "Extras" flag in EpisodeParseResult if we want to download them ever
|
||||
if (!String.IsNullOrEmpty(match[0].Groups["extras"].Value))
|
||||
return null;
|
||||
|
||||
parsedEpisode.FullSeason = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user