rename additional release title parameters from extra to post

pull/10881/head
Elia Petrachi 2 months ago
parent b48cdc804d
commit 81c190b610

@ -8,7 +8,7 @@ namespace NzbDrone.Core.CustomFormats
protected override bool IsSatisfiedByWithoutNegate(CustomFormatInput input)
{
return MatchString(input.MovieInfo?.SimpleReleaseTitle) || MatchString(input.Filename) || MatchString(input.MovieInfo?.TitleExtraParameters);
return MatchString(input.MovieInfo?.SimpleReleaseTitle) || MatchString(input.Filename) || MatchString(input.MovieInfo?.PostTitleParameters);
}
}
}

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Parser.Model
public string OriginalTitle { get; set; }
public string ReleaseTitle { get; set; }
public string SimpleReleaseTitle { get; set; }
public string TitleExtraParameters { get; set; }
public string PostTitleParameters { get; set; }
public QualityModel Quality { get; set; }
public List<Language> Languages { get; set; }
public string ReleaseGroup { get; set; }

@ -23,7 +23,7 @@ namespace NzbDrone.Core.Parser
private static readonly RegexReplace[] PreSubstitutionRegex = Array.Empty<RegexReplace>();
private static readonly Regex ExtraParametersRegex = new Regex(@"(?<extra>.+)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
private static readonly Regex PostTitleParametersRegex = new Regex(@"(?<additional>.+)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
private static readonly Regex[] ReportMovieTitleRegex = new[]
{
@ -51,7 +51,7 @@ namespace NzbDrone.Core.Parser
RegexOptions.IgnoreCase | RegexOptions.Compiled),*/
// Normal movie format, e.g: Mission.Impossible.3.2011
new Regex(@"^(?<title>(?![(\[]).+?)?(?:(?:[-_\W](?<![)\[!]))*(?<year>(1(8|9)|20)\d{2}(?!p|i|(1(8|9)|20)\d{2}|\]|\W(1(8|9)|20)\d{2})))+(\W+|_|$)(?!\\)" + ExtraParametersRegex, RegexOptions.IgnoreCase | RegexOptions.Compiled),
new Regex(@"^(?<title>(?![(\[]).+?)?(?:(?:[-_\W](?<![)\[!]))*(?<year>(1(8|9)|20)\d{2}(?!p|i|(1(8|9)|20)\d{2}|\]|\W(1(8|9)|20)\d{2})))+(\W+|_|$)(?!\\)" + PostTitleParametersRegex, RegexOptions.IgnoreCase | RegexOptions.Compiled),
// PassThePopcorn Torrent names: Star.Wars[PassThePopcorn]
new Regex(@"^(?<title>.+?)?(?:(?:[-_\W](?<![()\[!]))*(?<year>(\[\w *\])))+(\W+|_|$)(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled),
@ -669,9 +669,9 @@ namespace NzbDrone.Core.Parser
result.Edition = matchCollection[0].Groups["edition"].Value.Replace(".", " ");
}
if (matchCollection[0].Groups["extra"].Success)
if (matchCollection[0].Groups["additional"].Success)
{
result.TitleExtraParameters = matchCollection[0].Groups["extra"].Value.Replace(".", " ");
result.PostTitleParameters = matchCollection[0].Groups["additional"].Value.Replace(".", " ");
}
var movieTitles = new List<string>();

Loading…
Cancel
Save