More flexible matching some anime releases

This commit is contained in:
Mark McDowall 2018-08-18 10:56:02 -07:00
parent 46d8e5830a
commit c67c7e1b5a
2 changed files with 2 additions and 1 deletions

View File

@ -90,6 +90,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Love Rerun 2018 EP06 720p x265 AOZ.mp4", "Love Rerun 2018", 6, 0, 0)]
[TestCase("Love Rerun 2018 06 720p x265 AOZ.mp4", "Love Rerun 2018", 6, 0, 0)]
[TestCase("Boku No Hero Academia S03 - EP14 VOSTFR [1080p] [HardSub] Yass'Kun", "Boku No Hero Academia S03", 14, 0, 0)]
[TestCase("Boku No Hero Academia S3 - 15 VOSTFR [720p]", "Boku No Hero Academia S3", 15, 0, 0)]
//[TestCase("", "", 0, 0, 0)]
public void should_parse_absolute_numbers(string postTitle, string title, int absoluteEpisodeNumber, int seasonNumber, int episodeNumber)
{

View File

@ -163,7 +163,7 @@ namespace NzbDrone.Core.Parser
RegexOptions.IgnoreCase | RegexOptions.Compiled),
// Anime - Title with season number - Absolute Episode Number (Title S01 - EP14)
new Regex(@"^(?<title>.+?S\d{2})[. ]-[. ](?:EP)?(?<absoluteepisode>\d{2,3}(?!\d+|[-]))",
new Regex(@"^(?<title>.+?S\d{1,2})[-_. ]{3,}(?:EP)?(?<absoluteepisode>\d{2,3}(?!\d+|[-]))",
RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Season only releases