mirror of
https://github.com/Radarr/Radarr
synced 2025-02-23 14:51:17 +00:00
Fixed: Support movies with French in their title
Regression: Dropped Support for poorly named French Releases Add language test case Fixes #6821
This commit is contained in:
parent
568dd2fbb2
commit
1cb31aa95c
2 changed files with 5 additions and 3 deletions
|
@ -23,6 +23,7 @@ public class ParserFixture : CoreTest
|
|||
* Superman.-.The.Man.of.Steel.1994-06.34.hybrid.DreamGirl-Novus-HD
|
||||
* Superman.-.The.Man.of.Steel.1994-05.33.hybrid.DreamGirl-Novus-HD
|
||||
* Constantine S1-E1-WEB-DL-1080p-NZBgeek
|
||||
* [TestCase("Valana la Movie FRENCH BluRay 720p 2016 kjhlj", "Valana la Movie")] Removed 2021-12-19 as this / the regex for this was breaking all movies w/ french in title
|
||||
*/
|
||||
|
||||
[Test]
|
||||
|
@ -49,7 +50,6 @@ public void should_remove_accents_from_title()
|
|||
[TestCase("Movie.The.Final.Chapter.2016", "Movie The Final Chapter")]
|
||||
[TestCase("Der.Movie.James.German.Bluray.FuckYou.Pso.Why.cant.you.follow.scene.rules.1998", "Der Movie James")]
|
||||
[TestCase("Movie.German.DL.AC3.Dubbed..BluRay.x264-PsO", "Movie")]
|
||||
[TestCase("Valana la Movie FRENCH BluRay 720p 2016 kjhlj", "Valana la Movie")]
|
||||
[TestCase("Valana la Movie TRUEFRENCH BluRay 720p 2016 kjhlj", "Valana la Movie")]
|
||||
[TestCase("Mission Movie: Rogue Movie (2015)<29>[XviD - Ita Ac3 - SoftSub Ita]azione, spionaggio, thriller *Prima Visione* Team mulnic Tom Cruise", "Mission Movie Rogue Movie")]
|
||||
[TestCase("Movie.Movie.2000.FRENCH..BluRay.-AiRLiNE", "Movie Movie")]
|
||||
|
@ -61,6 +61,7 @@ public void should_remove_accents_from_title()
|
|||
[TestCase("World.Movie.Z.2.EXTENDED.2013.German.DL.1080p.BluRay.AVC-XANOR", "World Movie Z 2")]
|
||||
[TestCase("G.I.Movie.Movie.2013.THEATRiCAL.COMPLETE.BLURAY-GLiMMER", "G.I. Movie Movie")]
|
||||
[TestCase("www.Torrenting.org - Movie.2008.720p.X264-DIMENSION", "Movie")]
|
||||
[TestCase("The.French.Movie.2013.720p.BluRay.x264 - ROUGH[PublicHD]", "The French Movie")]
|
||||
public void should_parse_movie_title(string postTitle, string title)
|
||||
{
|
||||
Parser.Parser.ParseMovieTitle(postTitle).PrimaryMovieTitle.Should().Be(title);
|
||||
|
@ -199,6 +200,7 @@ public void should_parse_tmdb_id(string postTitle, int tmdbId)
|
|||
}
|
||||
|
||||
[TestCase("The.Italian.Movie.2025.720p.BluRay.X264-AMIABLE")]
|
||||
[TestCase("The.French.Movie.2013.720p.BluRay.x264 - ROUGH[PublicHD]")]
|
||||
public void should_not_parse_wrong_language_in_title(string postTitle)
|
||||
{
|
||||
var parsed = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||
|
|
|
@ -20,8 +20,8 @@ public static class Parser
|
|||
|
||||
private static readonly Regex[] ReportMovieTitleRegex = new[]
|
||||
{
|
||||
//Some german or french tracker formats (missing year, ...) (Only applies to german and French/TrueFrench releases) - see ParserFixture for examples and tests
|
||||
new Regex(@"^(?<title>(?![(\[]).+?)((\W|_))(" + EditionRegex + @".{1,3})?(?:(?<!(19|20)\d{2}.*?)(German|French|TrueFrench))(.+?)(?=((19|20)\d{2}|$))(?<year>(19|20)\d{2}(?!p|i|\d+|\]|\W\d+))?(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
//Some german or french tracker formats (missing year, ...) (Only applies to german and TrueFrench releases) - see ParserFixture for examples and tests - french removed as it broke all movies w/ french titles
|
||||
new Regex(@"^(?<title>(?![(\[]).+?)((\W|_))(" + EditionRegex + @".{1,3})?(?:(?<!(19|20)\d{2}.*?)(German|TrueFrench))(.+?)(?=((19|20)\d{2}|$))(?<year>(19|20)\d{2}(?!p|i|\d+|\]|\W\d+))?(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
|
||||
//Special, Despecialized, etc. Edition Movies, e.g: Mission.Impossible.3.Special.Edition.2011
|
||||
new Regex(@"^(?<title>(?![(\[]).+?)?(?:(?:[-_\W](?<![)\[!]))*" + EditionRegex + @".{1,3}(?<year>(1(8|9)|20)\d{2}(?!p|i|\d+|\]|\W\d+)))+(\W+|_|$)(?!\\)",
|
||||
|
|
Loading…
Reference in a new issue