mirror of
https://github.com/Jackett/Jackett
synced 2025-01-02 13:16:16 +00:00
elite-tracker: add multi config option. resolves #5064
add cat 97 fix category selector fix longtitle processing
This commit is contained in:
parent
cf1f70d581
commit
e85ffec947
2 changed files with 17 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -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("<b>Preferences Configuration</b> (<i>Tweak your search settings</i>),<br /><br /> <ul><li><b>Replace MULTI</b>, replace multi keyword in the resultset (leave empty to deactivate)</li></ul>") { Name = "Preferences" };
|
||||
ReplaceMulti = new StringItem() { Name = "Replace MULTI", Value = "MULTI.FRENCH" };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue