mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-05 03:00:21 +02:00
Fixed: (IPTorrents) Cleanup languages between brackets when possible
This commit is contained in:
parent
08b4eddbc5
commit
e6901506a0
1 changed files with 4 additions and 1 deletions
|
|
@ -403,10 +403,13 @@ private static int FindColumnIndexOrDefault(List<string> columns, string name, i
|
|||
|
||||
private static string CleanTitle(string title)
|
||||
{
|
||||
// drop invalid chars that seems to have cropped up in some titles. #6582
|
||||
// Drop invalid chars that seems to have cropped up in some titles. #6582
|
||||
title = Regex.Replace(title, @"[\u0000-\u0008\u000A-\u001F\u0100-\uFFFF]", string.Empty, RegexOptions.Compiled);
|
||||
title = Regex.Replace(title, @"[\(\[\{]REQ(UEST(ED)?)?[\)\]\}]", string.Empty, RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
// Drop languages between brackets conflicting with anime release group parsing
|
||||
title = Regex.Replace(title, @"^\[[a-z0-9 ._-]+\][-._ ](?<title>.*-[a-z0-9]+)$", "${title}", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
return title.Trim(' ', '-', ':');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue