mirror of
https://github.com/Radarr/Radarr
synced 2026-05-05 02:10:50 +02:00
Fixed: Remove website post fix before parsing
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
ae1e12f905
commit
dfdffb0626
1 changed files with 5 additions and 0 deletions
|
|
@ -102,6 +102,10 @@ public static class Parser
|
||||||
string.Empty,
|
string.Empty,
|
||||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||||
|
|
||||||
|
private static readonly RegexReplace WebsitePostfixRegex = new RegexReplace(@"\[\s*[-a-z]+(\.[a-z0-9]+)+\s*\]$",
|
||||||
|
string.Empty,
|
||||||
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||||
|
|
||||||
private static readonly RegexReplace CleanReleaseGroupRegex = new RegexReplace(@"(-(RP|1|NZBGeek|Obfuscated|Obfuscation|Scrambled|sample|Pre|postbot|xpost|Rakuv[a-z0-9]*|WhiteRev|BUYMORE|AsRequested|AlternativeToRequested|GEROV|Z0iDS3N|Chamele0n|4P|4Planet))+$",
|
private static readonly RegexReplace CleanReleaseGroupRegex = new RegexReplace(@"(-(RP|1|NZBGeek|Obfuscated|Obfuscation|Scrambled|sample|Pre|postbot|xpost|Rakuv[a-z0-9]*|WhiteRev|BUYMORE|AsRequested|AlternativeToRequested|GEROV|Z0iDS3N|Chamele0n|4P|4Planet))+$",
|
||||||
string.Empty,
|
string.Empty,
|
||||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||||
|
|
@ -193,6 +197,7 @@ public static ParsedMovieInfo ParseMovieTitle(string title, bool isLenient, bool
|
||||||
|
|
||||||
// TODO: Quick fix stripping [url] - prefixes.
|
// TODO: Quick fix stripping [url] - prefixes.
|
||||||
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
simpleTitle = WebsitePrefixRegex.Replace(simpleTitle);
|
||||||
|
simpleTitle = WebsitePostfixRegex.Replace(simpleTitle);
|
||||||
|
|
||||||
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
simpleTitle = CleanTorrentSuffixRegex.Replace(simpleTitle);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue