mirror of
https://github.com/Radarr/Radarr
synced 2025-12-26 10:12:42 +01:00
New: Handle multi title release names split by slash
Closes #7917 Co-Authored-By: andrey4korop <24610708+andrey4korop@users.noreply.github.com>
This commit is contained in:
parent
f1fcab75f5
commit
cba4850769
2 changed files with 8 additions and 1 deletions
|
|
@ -193,6 +193,13 @@ public void should_parse_german_movie(string postTitle, string title, string edi
|
|||
"Return Earth to Normal 'em High",
|
||||
"World 2"
|
||||
})]
|
||||
[TestCase("Енола Голмс / Enola Holmes (2020) UHD WEB-DL 2160p 4K HDR H.265 Ukr/Eng | Sub Ukr/Eng",
|
||||
new string[]
|
||||
{
|
||||
"Енола Голмс / Enola Holmes",
|
||||
"Енола Голмс",
|
||||
"Enola Holmes"
|
||||
})]
|
||||
public void should_parse_movie_alternative_titles(string postTitle, string[] parsedTitles)
|
||||
{
|
||||
var movieInfo = Parser.Parser.ParseMovieTitle(postTitle, true);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public static class Parser
|
|||
private static readonly Regex ReversedTitleRegex = new Regex(@"(?:^|[-._ ])(p027|p0801)[-._ ]", RegexOptions.Compiled);
|
||||
|
||||
// Regex to split movie titles that contain `AKA`.
|
||||
private static readonly Regex AlternativeTitleRegex = new Regex(@"[ ]+AKA[ ]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
private static readonly Regex AlternativeTitleRegex = new Regex(@"[ ]+(?:AKA|\/)[ ]+", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
// Regex to unbracket alternative titles.
|
||||
private static readonly Regex BracketedAlternativeTitleRegex = new Regex(@"(.*) \([ ]*AKA[ ]+(.*)\)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
|
|
|||
Loading…
Reference in a new issue