mirror of
https://github.com/Radarr/Radarr
synced 2025-03-14 16:09:37 +00:00
Fixed: Incorrectly Parsing [PublicHD] as Release Group
- Fixed: Incorrectly Parsing [PublicHD] as Release Group - Corrected: Parser Test Naming - Cleanse Torrent Suffix prior to determining the Group
This commit is contained in:
parent
560f12122f
commit
e632dea99a
2 changed files with 7 additions and 9 deletions
|
@ -47,11 +47,9 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("SomeMovie.1080p.BluRay.DTS.x264.-VH-PROD.mkv", "VH-PROD")]
|
||||
[TestCase("Some.Dead.Movie.2006.1080p.BluRay.DTS.x264.D-Z0N3", "D-Z0N3")]
|
||||
[TestCase("Movie.Title.2010.720p.BluRay.x264.-[YTS.LT]", "YTS.LT")]
|
||||
[TestCase("The.Movie.Title.2013.720p.BluRay.x264-ROUGH [PublicHD]", "ROUGH")]
|
||||
|
||||
//[TestCase("", "")]
|
||||
|
||||
//Exception Cases
|
||||
public void should_parse_exception_release_group(string title, string expected)
|
||||
public void should_parse_expected_release_group(string title, string expected)
|
||||
{
|
||||
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
|
||||
}
|
||||
|
@ -83,7 +81,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Movie Name - A History of Movie (2017) (1080p AMZN WEB-DL x265 HEVC 10bit EAC3 2.0 t3nzin)", "t3nzin")]
|
||||
[TestCase("Movie Name (2019) (1080p BluRay x265 HEVC 10bit AAC 7.1 Vyndros)", "Vyndros")]
|
||||
|
||||
public void should_parse_release_group(string title, string expected)
|
||||
public void should_parse_exception_release_group(string title, string expected)
|
||||
{
|
||||
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
|
||||
}
|
||||
|
@ -92,7 +90,6 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Some.Movie.S02E04.720p.WEBRip.x264-SKGTV_English", "SKGTV")]
|
||||
[TestCase("Some.Movie.S02E04.720p.WEBRip.x264-SKGTV.English", "SKGTV")]
|
||||
|
||||
//[TestCase("", "")]
|
||||
public void should_not_include_language_in_release_group(string title, string expected)
|
||||
{
|
||||
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
|
||||
|
@ -121,7 +118,8 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("Some.Movie.2019.1080p.BDRip.X264.AC3-EVO-4P", "EVO")]
|
||||
[TestCase("Some.Movie.2019.1080p.BDRip.X264.AC3-EVO-4Planet", "EVO")]
|
||||
[TestCase("Some.Movie.2019.1080p.BDRip.X264.AC3-DON-AlteZachen", "DON")]
|
||||
public void should_not_include_repost_in_release_group(string title, string expected)
|
||||
|
||||
public void should_not_include_bad_suffix_in_release_group(string title, string expected)
|
||||
{
|
||||
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
|
||||
}
|
||||
|
@ -132,7 +130,6 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
[TestCase("[Anime-Koi] Movies - S01E07 - A High-Grade Movies", "Anime-Koi")]
|
||||
[TestCase("[Anime-Koi] Kami-sama Movies 2 - 01 [h264-720p][28D54E2C]", "Anime-Koi")]
|
||||
|
||||
//[TestCase("", "")]
|
||||
public void should_parse_anime_release_groups(string title, string expected)
|
||||
{
|
||||
Parser.Parser.ParseReleaseGroup(title).Should().Be(expected);
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace NzbDrone.Core.Parser
|
|||
string.Empty,
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly RegexReplace CleanTorrentSuffixRegex = new RegexReplace(@"\[(?:ettv|rartv|rarbg|cttv)\]$",
|
||||
private static readonly RegexReplace CleanTorrentSuffixRegex = new RegexReplace(@"\[(?:ettv|rartv|rarbg|cttv|publichd)\]$",
|
||||
string.Empty,
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
|
@ -445,6 +445,7 @@ namespace NzbDrone.Core.Parser
|
|||
title = title.Trim();
|
||||
title = RemoveFileExtension(title);
|
||||
title = WebsitePrefixRegex.Replace(title);
|
||||
title = CleanTorrentSuffixRegex.Replace(title);
|
||||
|
||||
var animeMatch = AnimeReleaseGroupRegex.Match(title);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue