From 7e8111f6cdb28f85b3ef05ff5c8b654ffde7c280 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 9 Mar 2023 14:07:28 +0200 Subject: [PATCH] assorted: move public props at top (#14146) --- src/Jackett.Common/Indexers/DonTorrent.cs | 49 +++++++++++------------ src/Jackett.Common/Indexers/EpubLibre.cs | 47 +++++++++++----------- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/src/Jackett.Common/Indexers/DonTorrent.cs b/src/Jackett.Common/Indexers/DonTorrent.cs index 9f9f033c5..9522aeef5 100644 --- a/src/Jackett.Common/Indexers/DonTorrent.cs +++ b/src/Jackett.Common/Indexers/DonTorrent.cs @@ -22,21 +22,6 @@ namespace Jackett.Common.Indexers [ExcludeFromCodeCoverage] public class DonTorrent : BaseWebIndexer { - private static class DonTorrentCatType - { - public static string Pelicula => "pelicula"; - public static string Pelicula4K => "pelicula4k"; - public static string Serie => "serie"; - public static string SerieHD => "seriehd"; - public static string Documental => "documental"; - public static string Musica => "musica"; - public static string Variado => "variado"; - public static string Juego => "juego"; - } - - private const string NewTorrentsUrl = "ultimos"; - private const string SearchUrl = "buscar/"; - public override string[] AlternativeSiteLinks { get; protected set; } = { "https://dontorrent.cloud/", "https://todotorrents.net/", @@ -45,7 +30,6 @@ namespace Jackett.Common.Indexers "https://verdetorrent.com/", "https://naranjatorrent.com/" }; - public override string[] LegacySiteLinks { get; protected set; } = { "https://dontorrent.me/", "https://dontorrent.gs/", @@ -66,15 +50,30 @@ namespace Jackett.Common.Indexers "https://dontorrent.love/" }; + private static class DonTorrentCatType + { + public static string Pelicula => "pelicula"; + public static string Pelicula4K => "pelicula4k"; + public static string Serie => "serie"; + public static string SerieHD => "seriehd"; + public static string Documental => "documental"; + public static string Musica => "musica"; + public static string Variado => "variado"; + public static string Juego => "juego"; + } + + private const string NewTorrentsUrl = "ultimos"; + private const string SearchUrl = "buscar/"; + private static Dictionary CategoriesMap => new Dictionary - { - { "/pelicula/", DonTorrentCatType.Pelicula }, - { "/serie/", DonTorrentCatType.Serie }, - { "/documental", DonTorrentCatType.Documental }, - { "/musica/", DonTorrentCatType.Musica }, - { "/variado/", DonTorrentCatType.Variado }, - { "/juego/", DonTorrentCatType.Juego } //games, it can be pc or console - }; + { + { "/pelicula/", DonTorrentCatType.Pelicula }, + { "/serie/", DonTorrentCatType.Serie }, + { "/documental", DonTorrentCatType.Documental }, + { "/musica/", DonTorrentCatType.Musica }, + { "/variado/", DonTorrentCatType.Variado }, + { "/juego/", DonTorrentCatType.Juego } //games, it can be pc or console + }; public DonTorrent(IIndexerConfigurationService configService, WebClient w, Logger l, IProtectionService ps, ICacheService cs) @@ -108,7 +107,7 @@ namespace Jackett.Common.Indexers Language = "es-ES"; Type = "public"; - // avoid CLoudflare too many requests limiter + // avoid Cloudflare too many requests limiter webclient.requestDelay = 2.1; var matchWords = new BoolConfigurationItem("Match words in title") { Value = true }; diff --git a/src/Jackett.Common/Indexers/EpubLibre.cs b/src/Jackett.Common/Indexers/EpubLibre.cs index 8eedc471a..493f2bb75 100644 --- a/src/Jackett.Common/Indexers/EpubLibre.cs +++ b/src/Jackett.Common/Indexers/EpubLibre.cs @@ -19,6 +19,28 @@ namespace Jackett.Common.Indexers [ExcludeFromCodeCoverage] public class EpubLibre : BaseWebIndexer { + public override string[] AlternativeSiteLinks { get; protected set; } = { + "https://www.epublibre.org/", + "https://epublibre.unblockit.boo/" + }; + public override string[] LegacySiteLinks { get; protected set; } = { + "https://epublibre.org/", + "https://epublibre.unblockit.how/", + "https://epublibre.unblockit.cam/", + "https://epublibre.unblockit.day/", + "https://epublibre.unblockit.llc/", + "https://epublibre.unblockit.blue/", + "https://epublibre.unblockit.name/", + "https://epublibre.unblockit.ist/", + "https://epublibre.unblockit.bet/", + "https://epublibre.unblockit.cat/", + "https://epublibre.unblockit.nz/", + "https://epublibre.unblockit.page/", + "https://epublibre.unblockit.pet/", + "https://epublibre.unblockit.ink/", + "https://epublibre.unblockit.bio/" + }; + private string SearchUrl => SiteLink + "catalogo/index/{0}/nuevo/todos/sin/todos/{1}/ajax"; private string SobrecargaUrl => SiteLink + "inicio/sobrecarga"; private const int MaxItemsPerPage = 18; @@ -43,31 +65,8 @@ namespace Jackett.Common.Indexers {"12", "esperanto"} }; - public override string[] AlternativeSiteLinks { get; protected set; } = { - "https://www.epublibre.org/", - "https://epublibre.unblockit.boo/" - }; - - public override string[] LegacySiteLinks { get; protected set; } = { - "https://epublibre.org/", - "https://epublibre.unblockit.how/", - "https://epublibre.unblockit.cam/", - "https://epublibre.unblockit.day/", - "https://epublibre.unblockit.llc/", - "https://epublibre.unblockit.blue/", - "https://epublibre.unblockit.name/", - "https://epublibre.unblockit.ist/", - "https://epublibre.unblockit.bet/", - "https://epublibre.unblockit.cat/", - "https://epublibre.unblockit.nz/", - "https://epublibre.unblockit.page/", - "https://epublibre.unblockit.pet/", - "https://epublibre.unblockit.ink/", - "https://epublibre.unblockit.bio/" - }; - public EpubLibre(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps, - ICacheService cs) + ICacheService cs) : base(id: "epublibre", name: "EpubLibre", description: "Más libros, Más libres",