diff --git a/src/Jackett.Common/Indexers/Xthor.cs b/src/Jackett.Common/Indexers/Xthor.cs index 2997a9af3..a7924dd88 100644 --- a/src/Jackett.Common/Indexers/Xthor.cs +++ b/src/Jackett.Common/Indexers/Xthor.cs @@ -32,6 +32,7 @@ namespace Jackett.Common.Indexers private string TorrentCommentUrl => TorrentDescriptionUrl; private string TorrentDescriptionUrl => SiteLink + "details.php?id={id}"; + private string ReplaceMulti => ConfigData.ReplaceMulti.Value; private bool EnhancedAnime => ConfigData.EnhancedAnime.Value; private bool DevMode => ConfigData.DevMode.Value; private bool CacheMode => ConfigData.HardDriveCache.Value; @@ -221,6 +222,12 @@ namespace Jackett.Common.Indexers // Adding each torrent row to releases releases.AddRange(xthorResponse.torrents.Select(torrent => { + //issue #3847 replace multi keyword + if(!string.IsNullOrEmpty(ReplaceMulti)){ + System.Text.RegularExpressions.Regex regex = new Regex("(?i)([\\.\\- ])MULTI([\\.\\- ])"); + torrent.name = regex.Replace(torrent.name, "$1"+ReplaceMulti+"$2"); + } + var release = new ReleaseInfo { // Mapping data diff --git a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataXthor.cs b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataXthor.cs index df22f0ad6..bef260456 100644 --- a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataXthor.cs +++ b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataXthor.cs @@ -6,6 +6,7 @@ public StringItem PassKey { get; set; } public DisplayItem PagesWarning { get; private set; } public BoolItem Freeleech { get; private set; } + public StringItem ReplaceMulti { get; private set; } public BoolItem EnhancedAnime { get; private set; } public DisplayItem DevWarning { get; private set; } public BoolItem DevMode { get; private set; } @@ -17,8 +18,9 @@ { CredentialsWarning = new DisplayItem("Credentials Configuration (Private Tracker),

") { Name = "Credentials" }; PassKey = new StringItem { Name = "PassKey", Value = "" }; - PagesWarning = new DisplayItem("Preferences Configuration (Tweak your search settings),

") { Name = "Preferences" }; + PagesWarning = new DisplayItem("Preferences Configuration (Tweak your search settings),

") { Name = "Preferences" }; Freeleech = new BoolItem() { Name = "Freeleech Only (Optional)", Value = false }; + ReplaceMulti = new StringItem() { Name = "Replace MULTI", Value = "MULTI.FRENCH" }; EnhancedAnime = new BoolItem() { Name = "Enhanced anime search", Value = false }; DevWarning = new DisplayItem("Development Facility (For Developers ONLY),

") { Name = "Development" }; DevMode = new BoolItem { Name = "Enable DEV MODE (Developers ONLY)", Value = false };