mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 17:17:02 +00:00
Fixed broken Season parsing REGEX, added test to verify issue without parsing XML.
This commit is contained in:
parent
339f191ab8
commit
43fa8a1f66
2 changed files with 2 additions and 1 deletions
|
@ -331,6 +331,7 @@ public void normalize_path_exception_null()
|
|||
[TestCase("Eureka Season 1 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
|
||||
[TestCase("The Office Season4 WS PDTV XviD FUtV", "The Office", 4)]
|
||||
[TestCase("Eureka S 01 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
|
||||
[TestCase("Doctor Who Confidential Season 3", "Doctor Who Confidential", 3)]
|
||||
public void parse_season_info(string postTitle, string seriesName, int seasonNumber)
|
||||
{
|
||||
var result = Parser.ParseTitle(postTitle);
|
||||
|
|
|
@ -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(?<extras>EXTRAS)?(?!\\)",
|
||||
new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))\W?(?<extras>EXTRAS)?(?!\\)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled)
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue