mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
elite-tracker: add multi config option. resolves #5064
add cat 97 fix category selector fix longtitle processing
This commit is contained in:
@@ -24,8 +24,9 @@ namespace Jackett.Common.Indexers
|
|||||||
private string BrowseUrl
|
private string BrowseUrl
|
||||||
{ get { return SiteLink + "browse.php"; } }
|
{ get { return SiteLink + "browse.php"; } }
|
||||||
private bool TorrentHTTPSMode => configData.TorrentHTTPSMode.Value;
|
private bool TorrentHTTPSMode => configData.TorrentHTTPSMode.Value;
|
||||||
|
private string ReplaceMulti => configData.ReplaceMulti.Value;
|
||||||
private new ConfigurationDataEliteTracker configData
|
private new ConfigurationDataEliteTracker configData
|
||||||
|
|
||||||
{
|
{
|
||||||
get { return (ConfigurationDataEliteTracker)base.configData; }
|
get { return (ConfigurationDataEliteTracker)base.configData; }
|
||||||
set { base.configData = value; }
|
set { base.configData = value; }
|
||||||
@@ -35,6 +36,7 @@ namespace Jackett.Common.Indexers
|
|||||||
: base(name: "Elite-Tracker",
|
: base(name: "Elite-Tracker",
|
||||||
description: "French Torrent Tracker",
|
description: "French Torrent Tracker",
|
||||||
link: "https://elite-tracker.net/",
|
link: "https://elite-tracker.net/",
|
||||||
|
caps: new TorznabCapabilities(),
|
||||||
configService: configService,
|
configService: configService,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
p: protectionService,
|
p: protectionService,
|
||||||
@@ -46,6 +48,9 @@ namespace Jackett.Common.Indexers
|
|||||||
Language = "fr-fr";
|
Language = "fr-fr";
|
||||||
Type = "private";
|
Type = "private";
|
||||||
|
|
||||||
|
// Clean capabilities
|
||||||
|
TorznabCaps.Categories.Clear();
|
||||||
|
|
||||||
AddCategoryMapping(27, TorznabCatType.TVAnime, "Animation/Animes");
|
AddCategoryMapping(27, TorznabCatType.TVAnime, "Animation/Animes");
|
||||||
AddCategoryMapping(63, TorznabCatType.TVAnime, "Animes DVD");
|
AddCategoryMapping(63, TorznabCatType.TVAnime, "Animes DVD");
|
||||||
AddCategoryMapping(56, TorznabCatType.TVAnime, "Animes HD");
|
AddCategoryMapping(56, TorznabCatType.TVAnime, "Animes HD");
|
||||||
@@ -63,6 +68,7 @@ namespace Jackett.Common.Indexers
|
|||||||
AddCategoryMapping(4, TorznabCatType.PC0day, "WINDOWS");
|
AddCategoryMapping(4, TorznabCatType.PC0day, "WINDOWS");
|
||||||
|
|
||||||
AddCategoryMapping(38, TorznabCatType.TVDocumentary, "DOCUMENTAIRES");
|
AddCategoryMapping(38, TorznabCatType.TVDocumentary, "DOCUMENTAIRES");
|
||||||
|
AddCategoryMapping(97, TorznabCatType.TVDocumentary, "DOCUMENTAIRES PACK");
|
||||||
|
|
||||||
AddCategoryMapping(34, TorznabCatType.Books, "EBOOKS");
|
AddCategoryMapping(34, TorznabCatType.Books, "EBOOKS");
|
||||||
AddCategoryMapping(86, TorznabCatType.Books, "ABOOKS");
|
AddCategoryMapping(86, TorznabCatType.Books, "ABOOKS");
|
||||||
@@ -206,8 +212,8 @@ namespace Jackett.Common.Indexers
|
|||||||
var Seeders = Row.QuerySelector("td:nth-child(7)").QuerySelector("a");
|
var Seeders = Row.QuerySelector("td:nth-child(7)").QuerySelector("a");
|
||||||
var Leechers = Row.QuerySelector("td:nth-child(8)").QuerySelector("a");
|
var Leechers = Row.QuerySelector("td:nth-child(8)").QuerySelector("a");
|
||||||
|
|
||||||
var categoryIdparts = category.GetAttribute("href").Split('-');
|
var categoryId = category.GetAttribute("href").Split('=')[1];
|
||||||
var categoryId = categoryIdparts[categoryIdparts.Length - 1].Replace(".ts", "");
|
release.Category = MapTrackerCatToNewznab(categoryId);
|
||||||
|
|
||||||
release.Title = title.TextContent;
|
release.Title = title.TextContent;
|
||||||
release.Category = MapTrackerCatToNewznab(categoryId);
|
release.Category = MapTrackerCatToNewznab(categoryId);
|
||||||
@@ -258,12 +264,11 @@ namespace Jackett.Common.Indexers
|
|||||||
release.Description = desc;
|
release.Description = desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if even the tooltip title is shortened we use the URL
|
//issue #5064 replace multi keyword
|
||||||
if (release.Title.EndsWith("..."))
|
if (!string.IsNullOrEmpty(ReplaceMulti))
|
||||||
{
|
{
|
||||||
var tregex = new Regex(@"/([^/]+)-s-\d+\.ts");
|
System.Text.RegularExpressions.Regex regex = new Regex("(?i)([\\.\\- ])MULTI([\\.\\- ])");
|
||||||
var tmatch = tregex.Match(release.Comments.ToString());
|
release.Title = regex.Replace(release.Title, "$1" + ReplaceMulti + "$2");
|
||||||
release.Title = tmatch.Groups[1].Value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pretime != null)
|
if (pretime != null)
|
||||||
|
@@ -3,11 +3,15 @@
|
|||||||
class ConfigurationDataEliteTracker : ConfigurationDataBasicLogin
|
class ConfigurationDataEliteTracker : ConfigurationDataBasicLogin
|
||||||
{
|
{
|
||||||
public BoolItem TorrentHTTPSMode { get; private set; }
|
public BoolItem TorrentHTTPSMode { get; private set; }
|
||||||
|
public DisplayItem PagesWarning { get; private set; }
|
||||||
|
public StringItem ReplaceMulti { get; private set; }
|
||||||
|
|
||||||
public ConfigurationDataEliteTracker()
|
public ConfigurationDataEliteTracker()
|
||||||
: base()
|
: base()
|
||||||
{
|
{
|
||||||
TorrentHTTPSMode = new BoolItem { Name = "Use https for tracker URL", Value = false };
|
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" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user