From e6901506a0fb1a9de0422bdeb8d6c43e631e303c Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 2 Feb 2025 17:44:31 +0200 Subject: [PATCH] Fixed: (IPTorrents) Cleanup languages between brackets when possible --- src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs b/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs index d000c8206..d77c26935 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs @@ -403,10 +403,13 @@ namespace NzbDrone.Core.Indexers.Definitions 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 ._-]+\][-._ ](?.*-[a-z0-9]+)$", "${title}", RegexOptions.Compiled | RegexOptions.IgnoreCase); + return title.Trim(' ', '-', ':'); } }