dontorrent: convert from todotorrents. resolves #6214 (#12849)

This commit is contained in:
ilike2burnthing
2022-01-18 01:43:27 +00:00
committed by GitHub
parent 96fef53dae
commit cd2198bfe1
3 changed files with 27 additions and 29 deletions

View File

@@ -56,6 +56,7 @@ A third-party Golang SDK for Jackett is available from [webtor-io/go-jackett](ht
* Demonoid * Demonoid
* DivxTotal * DivxTotal
* dmhy * dmhy
* DonTorrent
* E-Hentai * E-Hentai
* elitetorrent * elitetorrent
* EpubLibre * EpubLibre
@@ -136,7 +137,6 @@ A third-party Golang SDK for Jackett is available from [webtor-io/go-jackett](ht
* sosulki * sosulki
* SubsPlease * SubsPlease
* sukebei.Nyaa.si * sukebei.Nyaa.si
* TodoTorrents
* The Pirate Bay (TPB) * The Pirate Bay (TPB)
* Tokyo Tosho * Tokyo Tosho
* Torlock * Torlock

View File

@@ -21,9 +21,9 @@ using WebClient = Jackett.Common.Utils.Clients.WebClient;
namespace Jackett.Common.Indexers namespace Jackett.Common.Indexers
{ {
[ExcludeFromCodeCoverage] [ExcludeFromCodeCoverage]
public class TodoTorrents : BaseWebIndexer public class DonTorrent : BaseWebIndexer
{ {
private static class TodoTorrentsCatType private static class DonTorrentCatType
{ {
public static string Pelicula => "pelicula"; public static string Pelicula => "pelicula";
public static string Pelicula4K => "pelicula4k"; public static string Pelicula4K => "pelicula4k";
@@ -39,28 +39,28 @@ namespace Jackett.Common.Indexers
private const string SearchUrl = "/buscar/"; private const string SearchUrl = "/buscar/";
public override string[] AlternativeSiteLinks { get; protected set; } = { public override string[] AlternativeSiteLinks { get; protected set; } = {
}; "https://dontorrent.li/",
"https://todotorrents.net/",
public override string[] LegacySiteLinks { get; protected set; } = { "https://tomadivx.net/",
"https://todotorrents.net" "https://seriesblanco.one/"
}; };
private static Dictionary<string, string> CategoriesMap => new Dictionary<string, string> private static Dictionary<string, string> CategoriesMap => new Dictionary<string, string>
{ {
{ "/pelicula/", TodoTorrentsCatType.Pelicula }, { "/pelicula/", DonTorrentCatType.Pelicula },
{ "/serie/", TodoTorrentsCatType.Serie }, { "/serie/", DonTorrentCatType.Serie },
{ "/documental", TodoTorrentsCatType.Documental }, { "/documental", DonTorrentCatType.Documental },
{ "/musica/", TodoTorrentsCatType.Musica }, { "/musica/", DonTorrentCatType.Musica },
{ "/variado/", TodoTorrentsCatType.Variado }, { "/variado/", DonTorrentCatType.Variado },
{ "/juego/", TodoTorrentsCatType.Juego } //games, it can be pc or console { "/juego/", DonTorrentCatType.Juego } //games, it can be pc or console
}; };
public TodoTorrents(IIndexerConfigurationService configService, WebClient w, Logger l, IProtectionService ps, public DonTorrent(IIndexerConfigurationService configService, WebClient w, Logger l, IProtectionService ps,
ICacheService cs) ICacheService cs)
: base(id: "todotorrents", : base(id: "dontorrent",
name: "TodoTorrents", name: "DonTorrent",
description: "TodoTorrents is a SPANISH public tracker for MOVIES / TV / GENERAL", description: "DonTorrent is a SPANISH public tracker for MOVIES / TV / GENERAL",
link: "https://todotorrents.net/", link: "https://dontorrent.li/",
caps: new TorznabCapabilities caps: new TorznabCapabilities
{ {
TvSearchParams = new List<TvSearchParam> TvSearchParams = new List<TvSearchParam>
@@ -90,13 +90,11 @@ namespace Jackett.Common.Indexers
var matchWords = new BoolConfigurationItem("Match words in title") { Value = true }; var matchWords = new BoolConfigurationItem("Match words in title") { Value = true };
configData.AddDynamic("MatchWords", matchWords); configData.AddDynamic("MatchWords", matchWords);
//configData.AddDynamic("flaresolverr", new DisplayInfoConfigurationItem("FlareSolverr", "This site may use Cloudflare DDoS Protection, therefore Jackett requires <a href=\"https://github.com/Jackett/Jackett#configuring-flaresolverr\" target=\"_blank\">FlareSolver</a> to access it.")); AddCategoryMapping(DonTorrentCatType.Pelicula, TorznabCatType.Movies, "Pelicula");
AddCategoryMapping(DonTorrentCatType.Pelicula4K, TorznabCatType.MoviesUHD, "Peliculas 4K");
AddCategoryMapping(TodoTorrentsCatType.Pelicula, TorznabCatType.Movies, "Pelicula"); AddCategoryMapping(DonTorrentCatType.Serie, TorznabCatType.TVSD, "Serie");
AddCategoryMapping(TodoTorrentsCatType.Pelicula4K, TorznabCatType.MoviesUHD, "Peliculas 4K"); AddCategoryMapping(DonTorrentCatType.SerieHD, TorznabCatType.TVHD, "Serie HD");
AddCategoryMapping(TodoTorrentsCatType.Serie, TorznabCatType.TVSD, "Serie"); AddCategoryMapping(DonTorrentCatType.Musica, TorznabCatType.Audio, "Música");
AddCategoryMapping(TodoTorrentsCatType.SerieHD, TorznabCatType.TVHD, "Serie HD");
AddCategoryMapping(TodoTorrentsCatType.Musica, TorznabCatType.Audio, "Música");
} }
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson) public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
@@ -135,7 +133,7 @@ namespace Jackett.Common.Indexers
var parser = new HtmlParser(); var parser = new HtmlParser();
// Eg https://todotorrents.net/pelicula/24797/Halloween-Kills // Eg https://dontorrent.li/pelicula/24797/Halloween-Kills
var result = await RequestWithCookiesAsync(downloadUrl); var result = await RequestWithCookiesAsync(downloadUrl);
if (result.Status != HttpStatusCode.OK) if (result.Status != HttpStatusCode.OK)
throw new ExceptionWithConfigData(result.ContentString, configData); throw new ExceptionWithConfigData(result.ContentString, configData);
@@ -495,7 +493,6 @@ namespace Jackett.Common.Indexers
Category = MapTrackerCatToNewznab(cat), Category = MapTrackerCatToNewznab(cat),
PublishDate = publishDate, PublishDate = publishDate,
Size = size, Size = size,
Files = 1,
Seeders = 1, Seeders = 1,
Peers = 2, Peers = 2,
DownloadVolumeFactor = 0, DownloadVolumeFactor = 0,
@@ -673,7 +670,7 @@ namespace Jackett.Common.Indexers
case "pelicula4k": case "pelicula4k":
if (title.Contains("4K")) if (title.Contains("4K"))
{ {
cat = TodoTorrentsCatType.Pelicula4K; cat = DonTorrentCatType.Pelicula4K;
} }
break; break;
@@ -681,7 +678,7 @@ namespace Jackett.Common.Indexers
case "seriehd": case "seriehd":
if (title.Contains("720p") || title.Contains("1080p")) if (title.Contains("720p") || title.Contains("1080p"))
{ {
cat = TodoTorrentsCatType.SerieHD; cat = DonTorrentCatType.SerieHD;
} }
break; break;

View File

@@ -42,6 +42,7 @@ namespace Jackett.Common.Services
{ {
{"audiobooktorrents", "abtorrents"}, {"audiobooktorrents", "abtorrents"},
{"broadcastthenet", "broadcasthenet"}, {"broadcastthenet", "broadcasthenet"},
{"todotorrents", "dontorrent"},
{"hdreactor", "hdhouse"}, {"hdreactor", "hdhouse"},
{"icetorrent", "speedapp"}, {"icetorrent", "speedapp"},
{"kickasstorrent-kathow", "kickasstorrents-ws"}, {"kickasstorrent-kathow", "kickasstorrents-ws"},