core: remove virtual member calls (part 1) (#8011)

This commit is contained in:
Diego Heras 2020-04-04 00:37:42 +02:00 committed by GitHub
parent 933f983fdf
commit b2390bb954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 102 additions and 85 deletions

View File

@ -65,9 +65,6 @@ namespace Jackett.Common.Indexers
Encoding = Encoding.UTF8;
Type = "private";
// Clean capabilities
TorznabCaps.Categories.Clear();
// Movies
AddCategoryMapping("MOVIE|DVDR", TorznabCatType.MoviesDVD); // DVDR
AddCategoryMapping("MOVIE|DVDRIP", TorznabCatType.MoviesSD); // DVDRIP

View File

@ -27,7 +27,10 @@ namespace Jackett.Common.Indexers.Abstract
: base(name: name,
description: description,
link: link,
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: client,
logger: logger,
@ -36,7 +39,6 @@ namespace Jackett.Common.Indexers.Abstract
)
{
this.endpoint = endpoint;
TorznabCaps.SupportsImdbMovieSearch = true;
}
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)

View File

@ -24,7 +24,11 @@ namespace Jackett.Common.Indexers
: base("Awesome-HD",
description: "An HD tracker",
link: "https://awesome-hd.me/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true,
SupportsImdbTVSearch = true
},
configService: configService,
client: c,
logger: l,
@ -35,9 +39,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.SupportsImdbTVSearch = true;
AddCategoryMapping(1, TorznabCatType.MoviesHD);
AddCategoryMapping(2, TorznabCatType.TVHD);
AddCategoryMapping(3, TorznabCatType.Audio);

View File

@ -34,7 +34,11 @@ namespace Jackett.Common.Indexers
name: "BIT-HDTV",
description: "BIT-HDTV - Home of High Definition",
link: "https://www.bit-hdtv.com/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true,
SupportsImdbTVSearch = true
},
configService: configService,
client: w,
logger: l,
@ -44,8 +48,7 @@ namespace Jackett.Common.Indexers
Encoding = Encoding.GetEncoding("iso-8859-1");
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.SupportsImdbTVSearch = true;
AddCategoryMapping(1, TorznabCatType.TVAnime); // Anime
AddCategoryMapping(2, TorznabCatType.MoviesBluRay); // Blu-ray
AddCategoryMapping(4, TorznabCatType.TVDocumentary); // Documentaries

View File

@ -27,7 +27,11 @@ namespace Jackett.Common.Indexers
: base("Elite-Tracker",
description: "French Torrent Tracker",
link: "https://elite-tracker.net/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true,
SupportsImdbTVSearch = true
},
configService: configService,
logger: logger,
p: protectionService,
@ -39,9 +43,6 @@ namespace Jackett.Common.Indexers
Language = "fr-fr";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.SupportsImdbTVSearch = true;
AddCategoryMapping(27, TorznabCatType.TVAnime, "Animation/Animes");
AddCategoryMapping(90, TorznabCatType.TVAnime, "Animes - 3D");
AddCategoryMapping(99, TorznabCatType.TVAnime, "Animes - 4K");

View File

@ -25,7 +25,11 @@ namespace Jackett.Common.Indexers
: base("FunFile",
description: "A general tracker",
link: "https://www.funfile.org/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true,
SupportsImdbTVSearch = true
},
configService: configService,
client: w,
logger: l,
@ -36,9 +40,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.SupportsImdbTVSearch = true;
AddCategoryMapping(44, TorznabCatType.TVAnime); // Anime
AddCategoryMapping(22, TorznabCatType.PC); // Applications
AddCategoryMapping(43, TorznabCatType.AudioAudiobook); // Audio Books

View File

@ -37,6 +37,10 @@ namespace Jackett.Common.Indexers
: base(name: "Fuzer",
description: "Fuzer is a private torrent website with israeli torrents.",
link: "https://www.fuzer.me/",
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: w,
logger: l,
@ -46,8 +50,6 @@ namespace Jackett.Common.Indexers
Encoding = Encoding.GetEncoding("windows-1255");
Language = "he-il";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.Categories.Clear();
// סרטים
AddCategoryMapping(7, TorznabCatType.MoviesSD, "סרטים");

View File

@ -27,7 +27,10 @@ namespace Jackett.Common.Indexers
: base(name: "HDBits (API)",
description: "The HighDefinition Bittorrent Community",
link: "https://hdbits.org/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: wc,
logger: l,
@ -37,7 +40,6 @@ namespace Jackett.Common.Indexers
Encoding = Encoding.UTF8;
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
AddCategoryMapping(6, TorznabCatType.Audio, "Audio Track");
AddCategoryMapping(3, TorznabCatType.TVDocumentary, "Documentary");

View File

@ -39,6 +39,11 @@ namespace Jackett.Common.Indexers
: base(name: "HD-Torrents",
description: "HD-Torrents is a private torrent website with HD torrents and strict rules on their content.",
link: "https://hdts.ru/",// Of the accessible domains the .ru seems the most reliable. https://hdts.ru | https://hd-torrents.org | https://hd-torrents.net | https://hd-torrents.me
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true,
SupportsImdbTVSearch = true
},
configService: configService,
client: w,
logger: l,
@ -49,11 +54,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.SupportsImdbTVSearch = true;
TorznabCaps.Categories.Clear();
// Movie
AddCategoryMapping("70", TorznabCatType.MoviesUHD, "Movie/UHD/Blu-Ray");
AddCategoryMapping("1", TorznabCatType.MoviesHD, "Movie/Blu-Ray");

View File

@ -52,7 +52,10 @@ namespace Jackett.Common.Indexers
: base(name: "IPTorrents",
description: "Always a step ahead.",
link: "https://iptorrents.com/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: wc,
logger: l,
@ -63,8 +66,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
AddCategoryMapping(72, TorznabCatType.Movies, "Movies");
AddCategoryMapping(87, TorznabCatType.Movies3D, "Movie/3D");
AddCategoryMapping(77, TorznabCatType.MoviesSD, "Movie/480p");

View File

@ -48,7 +48,10 @@ namespace Jackett.Common.Indexers
name: "Norbits",
description: "Norbits is a Norwegian Private site for MOVIES / TV / GENERAL",
link: "https://norbits.net/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: w,
logger: l,
@ -59,8 +62,6 @@ namespace Jackett.Common.Indexers
Language = "nb-no";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
AddCategoryMapping("main_cat[]=1&sub2_cat[]=19", TorznabCatType.MoviesHD, "Filmer - HD-1080p/i");
AddCategoryMapping("main_cat[]=1&sub2_cat[]=20", TorznabCatType.MoviesHD, "Filmer - HD-720p");
AddCategoryMapping("main_cat[]=1&sub2_cat[]=22", TorznabCatType.MoviesSD, "Filmer - SD");

View File

@ -47,7 +47,10 @@ namespace Jackett.Common.Indexers
name: "Nordicbits",
description: "Nordicbits is a Danish Private site for MOVIES / TV / GENERAL",
link: "https://nordicb.org/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: w,
logger: l,
@ -58,8 +61,6 @@ namespace Jackett.Common.Indexers
Language = "da-dk";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = false;
// Apps
AddCategoryMapping("cat=63", TorznabCatType.PCPhoneAndroid, "APPS - Android");
AddCategoryMapping("cat=17", TorznabCatType.PC, "APPS - MAC");

View File

@ -30,7 +30,10 @@ namespace Jackett.Common.Indexers
: base(name: "PassThePopcorn",
description: "PassThePopcorn is a Private site for MOVIES / TV",
link: "https://passthepopcorn.me/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: c,
logger: l,
@ -43,8 +46,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
webclient.requestDelay = 2; // 0.5 requests per second
AddCategoryMapping(1, TorznabCatType.Movies, "Feature Film");

View File

@ -35,7 +35,10 @@ namespace Jackett.Common.Indexers
: base(name: "PiXELHD",
description: "PixelHD (PxHD) is a Private Torrent Tracker for HD .MP4 MOVIES / TV",
link: "https://pixelhd.me/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
logger: logger,
p: protectionService,
@ -47,8 +50,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
AddCategoryMapping(1, TorznabCatType.MoviesHD);
}

View File

@ -33,7 +33,10 @@ namespace Jackett.Common.Indexers
: base(name: "PirateTheNet",
description: "A movie tracker",
link: "http://piratethenet.org/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: w,
logger: l,
@ -44,8 +47,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
configData.DisplayText.Value = "Only the results from the first search result page are shown, adjust your profile settings to show the maximum.";
configData.DisplayText.Name = "Notice";

View File

@ -30,7 +30,11 @@ namespace Jackett.Common.Indexers
: base("PolishTracker",
description: "Polish Tracker is a POLISH Private site for 0DAY / MOVIES / GENERAL",
link: "https://pte.nu/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true,
SupportsImdbTVSearch = true,
},
configService: configService,
client: wc,
logger: l,
@ -41,9 +45,6 @@ namespace Jackett.Common.Indexers
Language = "pl-pl";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.SupportsImdbTVSearch = true;
AddCategoryMapping(1, TorznabCatType.PC0day, "0-Day");
AddCategoryMapping(3, TorznabCatType.PC0day, "Apps");
AddCategoryMapping(4, TorznabCatType.Console, "Consoles");

View File

@ -50,7 +50,10 @@ namespace Jackett.Common.Indexers
: base(name: "RARBG",
description: "RARBG is a Public torrent site for MOVIES / TV / GENERAL",
link: "https://rarbg.to/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: wc,
logger: l,
@ -74,8 +77,6 @@ namespace Jackett.Common.Indexers
provideTorrentLinkItem.Name = "Generate torrent download link additionally to magnet (not recommended due to DDoS protection).";
configData.AddDynamic("providetorrentlink", provideTorrentLinkItem);
TorznabCaps.SupportsImdbMovieSearch = true;
webclient.requestDelay = 2.1; // The api has a 1req/2s limit.
AddCategoryMapping(4, TorznabCatType.XXX, "XXX (18+)");

View File

@ -30,7 +30,10 @@ namespace Jackett.Common.Indexers
description: "SceneHD is Private site for HD TV / MOVIES",
link: "https://scenehd.org/",
configService: configService,
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
client: c,
logger: l,
p: ps,
@ -39,7 +42,7 @@ namespace Jackett.Common.Indexers
Encoding = Encoding.UTF8;
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
webclient.EmulateBrowser = false;
webclient.AddTrustedCertificate(new Uri(SiteLink).Host, "D948487DD52462F2D1E62B990D608051E3DE5AA6");

View File

@ -30,7 +30,11 @@ namespace Jackett.Common.Indexers
: base("Speed.cd",
description: "Your home now!",
link: "https://speed.cd/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true,
SupportsImdbTVSearch = true
},
configService: configService,
client: wc,
logger: l,
@ -44,9 +48,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
TorznabCaps.SupportsImdbTVSearch = true;
AddCategoryMapping(1, TorznabCatType.MoviesOther, "Movies/XviD");
AddCategoryMapping(42, TorznabCatType.Movies, "Movies/Packs");
AddCategoryMapping(32, TorznabCatType.Movies, "Movies/Kids");

View File

@ -31,7 +31,10 @@ namespace Jackett.Common.Indexers
: base(name: "Superbits",
description: "SuperBits is a SWEDISH Private Torrent Tracker for MOVIES / TV / GENERAL",
link: "https://superbits.org/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: w,
logger: l,
@ -42,8 +45,6 @@ namespace Jackett.Common.Indexers
Language = "sv-sw";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
AddCategoryMapping(1, TorznabCatType.MoviesDVD, "DVD-R Swesub");
AddCategoryMapping(2, TorznabCatType.TV, "DVD-R TV");
AddCategoryMapping(3, TorznabCatType.BooksEbook, "eBok");

View File

@ -35,7 +35,10 @@ namespace Jackett.Common.Indexers
: base(name: "Torrent-Syndikat",
description: "A German general tracker",
link: "https://torrent-syndikat.org/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: w,
logger: l,
@ -46,8 +49,6 @@ namespace Jackett.Common.Indexers
Language = "de-de";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
configData.DisplayText.Value = "Only the results from the first search result page are shown, adjust your profile settings to show the maximum.";
configData.DisplayText.Name = "Notice";

View File

@ -29,7 +29,10 @@ namespace Jackett.Common.Indexers
name: "Torrents.csv",
description: "Torrents.csv is a self-hostable, open source torrent search engine and database",
link: "https://torrents-csv.ml/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: wc,
logger: l,
@ -49,10 +52,6 @@ namespace Jackett.Common.Indexers
AddCategoryMapping(6000, TorznabCatType.XXX);
AddCategoryMapping(7000, TorznabCatType.Other);
AddCategoryMapping(8000, TorznabCatType.Books);
TorznabCaps.SupportsImdbMovieSearch = false;
webclient.requestDelay = 0;
}
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)

View File

@ -58,9 +58,6 @@ namespace Jackett.Common.Indexers
Language = "fr-fr";
Type = "private";
// Clean capabilities
TorznabCaps.Categories.Clear();
// Movies
AddCategoryMapping(118, TorznabCatType.MoviesBluRay, "UHD FULL BLURAY");
AddCategoryMapping(119, TorznabCatType.MoviesBluRay, "UHD BLURAY REMUX");

View File

@ -32,7 +32,10 @@ namespace Jackett.Common.Indexers
: base(name: "DigitalCore",
description: "DigitalCore is a Private Torrent Tracker for MOVIES / TV / GENERAL",
link: "https://digitalcore.club/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: w,
logger: l,
@ -43,8 +46,6 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "private";
TorznabCaps.SupportsImdbMovieSearch = true;
AddCategoryMapping(1, TorznabCatType.MoviesDVD, "Movies/DVDR");
AddCategoryMapping(2, TorznabCatType.MoviesSD, "Movies/SD");
AddCategoryMapping(3, TorznabCatType.MoviesBluRay, "Movies/BluRay");

View File

@ -46,9 +46,6 @@ namespace Jackett.Common.Indexers
Language = "ru-ru";
Type = "semi-private";
// Clean capabilities
TorznabCaps.Categories.Clear();
AddCategoryMapping(1768, TorznabCatType.XXX, "Эротические фильмы / Erotic Movies");
AddCategoryMapping(60, TorznabCatType.XXX, "Документальные фильмы / Documentary & Reality");
AddCategoryMapping(1644, TorznabCatType.XXX, "Нудизм-Натуризм / Nudity");
@ -178,7 +175,6 @@ namespace Jackett.Common.Indexers
AddCategoryMapping(1683, TorznabCatType.XXX, "Архив (общий)");
AddCategoryMapping(1688, TorznabCatType.XXX, "Гей-порно / Gay Forum");
AddCategoryMapping(1720, TorznabCatType.XXX, "Архив (Гей-порно)");
}
public override async Task<ConfigurationData> GetConfigurationForSetup()

View File

@ -35,7 +35,10 @@ namespace Jackett.Common.Indexers
: base(name: "YTS",
description: "YTS is a Public torrent site specialising in HD movies of small size",
link: "https://yts.mx/",
caps: new TorznabCapabilities(),
caps: new TorznabCapabilities
{
SupportsImdbMovieSearch = true
},
configService: configService,
client: wc,
logger: l,
@ -46,12 +49,10 @@ namespace Jackett.Common.Indexers
Language = "en-us";
Type = "public";
TorznabCaps.SupportsImdbMovieSearch = true;
webclient.requestDelay = 2.5; // 0.5 requests per second (2 causes problems)
// note: the API does not support searching with categories, so these are dummy ones for torznab compatibility
// we map these newznab cats with the returned quality value in the releases routine.
// we map these newznab cats with the returned quality value in the releases routine.
AddCategoryMapping(45, TorznabCatType.MoviesHD, "Movies/x264/720p");
AddCategoryMapping(44, TorznabCatType.MoviesHD, "Movies/x264/1080p");
AddCategoryMapping(46, TorznabCatType.MoviesUHD, "Movies/x264/2160p"); // added for #7010