diff --git a/src/Jackett.Common/Indexers/EliteTracker.cs b/src/Jackett.Common/Indexers/EliteTracker.cs index 3b9249a56..388b1fcf4 100644 --- a/src/Jackett.Common/Indexers/EliteTracker.cs +++ b/src/Jackett.Common/Indexers/EliteTracker.cs @@ -24,8 +24,9 @@ namespace Jackett.Common.Indexers private string BrowseUrl { get { return SiteLink + "browse.php"; } } private bool TorrentHTTPSMode => configData.TorrentHTTPSMode.Value; - + private string ReplaceMulti => configData.ReplaceMulti.Value; private new ConfigurationDataEliteTracker configData + { get { return (ConfigurationDataEliteTracker)base.configData; } set { base.configData = value; } @@ -35,6 +36,7 @@ namespace Jackett.Common.Indexers : base(name: "Elite-Tracker", description: "French Torrent Tracker", link: "https://elite-tracker.net/", + caps: new TorznabCapabilities(), configService: configService, logger: logger, p: protectionService, @@ -46,6 +48,9 @@ namespace Jackett.Common.Indexers Language = "fr-fr"; Type = "private"; + // Clean capabilities + TorznabCaps.Categories.Clear(); + AddCategoryMapping(27, TorznabCatType.TVAnime, "Animation/Animes"); AddCategoryMapping(63, TorznabCatType.TVAnime, "Animes DVD"); AddCategoryMapping(56, TorznabCatType.TVAnime, "Animes HD"); @@ -63,6 +68,7 @@ namespace Jackett.Common.Indexers AddCategoryMapping(4, TorznabCatType.PC0day, "WINDOWS"); AddCategoryMapping(38, TorznabCatType.TVDocumentary, "DOCUMENTAIRES"); + AddCategoryMapping(97, TorznabCatType.TVDocumentary, "DOCUMENTAIRES PACK"); AddCategoryMapping(34, TorznabCatType.Books, "EBOOKS"); AddCategoryMapping(86, TorznabCatType.Books, "ABOOKS"); @@ -206,8 +212,8 @@ namespace Jackett.Common.Indexers var Seeders = Row.QuerySelector("td:nth-child(7)").QuerySelector("a"); var Leechers = Row.QuerySelector("td:nth-child(8)").QuerySelector("a"); - var categoryIdparts = category.GetAttribute("href").Split('-'); - var categoryId = categoryIdparts[categoryIdparts.Length - 1].Replace(".ts", ""); + var categoryId = category.GetAttribute("href").Split('=')[1]; + release.Category = MapTrackerCatToNewznab(categoryId); release.Title = title.TextContent; release.Category = MapTrackerCatToNewznab(categoryId); @@ -258,12 +264,11 @@ namespace Jackett.Common.Indexers release.Description = desc; } - // if even the tooltip title is shortened we use the URL - if (release.Title.EndsWith("...")) + //issue #5064 replace multi keyword + if (!string.IsNullOrEmpty(ReplaceMulti)) { - var tregex = new Regex(@"/([^/]+)-s-\d+\.ts"); - var tmatch = tregex.Match(release.Comments.ToString()); - release.Title = tmatch.Groups[1].Value; + System.Text.RegularExpressions.Regex regex = new Regex("(?i)([\\.\\- ])MULTI([\\.\\- ])"); + release.Title = regex.Replace(release.Title, "$1" + ReplaceMulti + "$2"); } if (pretime != null) diff --git a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataEliteTracker.cs b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataEliteTracker.cs index 1b20cb48d..d64ac7edd 100644 --- a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataEliteTracker.cs +++ b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataEliteTracker.cs @@ -3,11 +3,15 @@ class ConfigurationDataEliteTracker : ConfigurationDataBasicLogin { public BoolItem TorrentHTTPSMode { get; private set; } + public DisplayItem PagesWarning { get; private set; } + public StringItem ReplaceMulti { get; private set; } public ConfigurationDataEliteTracker() : base() { TorrentHTTPSMode = new BoolItem { Name = "Use https for tracker URL", Value = false }; + PagesWarning = new DisplayItem("Preferences Configuration (Tweak your search settings),

") { Name = "Preferences" }; + ReplaceMulti = new StringItem() { Name = "Replace MULTI", Value = "MULTI.FRENCH" }; } } }