diff --git a/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/AvistazFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/AvistazFixture.cs index 290944b46..872f1c4af 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/AvistazFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/AvistazFixture.cs @@ -17,7 +17,7 @@ using NzbDrone.Core.Test.Framework; namespace NzbDrone.Core.Test.IndexerTests.AvistazTests { [TestFixture] - public class AvistazFixture : CoreTest + public class AvistazFixture : CoreTest { [SetUp] public void Setup() diff --git a/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/PrivateHDFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/PrivateHDFixture.cs index e259a928c..9fd08548f 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/PrivateHDFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/AvistazTests/PrivateHDFixture.cs @@ -17,7 +17,7 @@ using NzbDrone.Core.Test.Framework; namespace NzbDrone.Core.Test.IndexerTests.AvistazTests { [TestFixture] - public class PrivateHDFixture : CoreTest + public class PrivateHDFixture : CoreTest { [SetUp] public void Setup() diff --git a/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs b/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs index 969f0c014..07998bb27 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/TestIndexer.cs @@ -3,6 +3,7 @@ using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download; using NzbDrone.Core.Indexers; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Test.IndexerTests @@ -20,8 +21,8 @@ namespace NzbDrone.Core.Test.IndexerTests public int _supportedPageSize; public override int PageSize => _supportedPageSize; - public TestIndexer(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, nzbValidationService, logger) + public TestIndexer(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, nzbValidationService, logger) { } diff --git a/src/NzbDrone.Core/Datastore/Migration/019_indexer_definition.cs b/src/NzbDrone.Core/Datastore/Migration/019_indexer_definition.cs new file mode 100644 index 000000000..51d91568d --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/019_indexer_definition.cs @@ -0,0 +1,87 @@ +using System.Collections.Generic; +using System.Data; +using System.Text.Json; +using Dapper; +using FluentMigrator; +using NzbDrone.Common.Serializer; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(19)] + public class indexer_definition : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Alter.Table("Indexers") + .AddColumn("DefinitionFile").AsString().Nullable(); + + Execute.WithConnection(MigrateCardigannDefinitions); + } + + private void MigrateCardigannDefinitions(IDbConnection conn, IDbTransaction tran) + { + var indexers = new List(); + + using (var cmd = conn.CreateCommand()) + { + cmd.Transaction = tran; + cmd.CommandText = "SELECT \"Id\", \"Settings\", \"Implementation\", \"ConfigContract\" FROM \"Indexers\""; + + using (var reader = cmd.ExecuteReader()) + { + while (reader.Read()) + { + var id = reader.GetInt32(0); + var settings = reader.GetString(1); + var implementation = reader.GetString(2); + var configContract = reader.GetString(3); + var defFile = implementation.ToLowerInvariant(); + + if (implementation == "Cardigann") + { + if (!string.IsNullOrWhiteSpace(settings)) + { + var jsonObject = STJson.Deserialize(settings); + + if (jsonObject.TryGetProperty("definitionFile", out JsonElement jsonDef)) + { + defFile = jsonDef.GetString(); + } + } + } + else if (configContract == "AvistazSettings") + { + implementation = "Avistaz"; + } + else if (configContract == "Unit3dSettings") + { + implementation = "Unit3d"; + } + else if (configContract == "Newznab") + { + defFile = ""; + } + + indexers.Add(new Indexer017 + { + DefinitionFile = defFile, + Implementation = implementation, + Id = id + }); + } + } + } + + var updateSql = "UPDATE \"Indexers\" SET \"DefinitionFile\" = @DefinitionFile, \"Implementation\" = @Implementation WHERE \"Id\" = @Id"; + conn.Execute(updateSql, indexers, transaction: tran); + } + + public class Indexer017 + { + public int Id { get; set; } + public string DefinitionFile { get; set; } + public string Implementation { get; set; } + } + } +} diff --git a/src/NzbDrone.Core/HealthCheck/Checks/NoDefinitionCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/NoDefinitionCheck.cs index 24c49c41d..73c71d3e5 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/NoDefinitionCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/NoDefinitionCheck.cs @@ -26,7 +26,7 @@ namespace NzbDrone.Core.HealthCheck.Checks var currentDefs = _indexerDefinitionUpdateService.All(); var noDefIndexers = _indexerFactory.AllProviders(false) - .Where(i => i.Definition.Implementation == "Cardigann" && !currentDefs.Any(d => d.File == ((CardigannSettings)i.Definition.Settings).DefinitionFile)).ToList(); + .Where(i => i.Definition.Implementation == "Cardigann" && !currentDefs.Any(d => d.File == ((IndexerDefinition)i.Definition).DefinitionFile)).ToList(); if (noDefIndexers.Count == 0) { diff --git a/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs index c45c37db6..af18ca306 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs @@ -28,7 +28,7 @@ namespace NzbDrone.Core.HealthCheck.Checks var blocklist = _indexerDefinitionUpdateService.GetBlocklist(); var oldIndexers = _indexerFactory.AllProviders(false) - .Where(i => i.IsObsolete() || (i.Definition.Implementation == "Cardigann" && blocklist.Contains(((CardigannSettings)i.Definition.Settings).DefinitionFile))).ToList(); + .Where(i => i.IsObsolete() || (i.Definition.Implementation == "Cardigann" && blocklist.Contains(((IndexerDefinition)i.Definition).DefinitionFile))).ToList(); if (oldIndexers.Count == 0) { diff --git a/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs b/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs index 408959075..a10b0cb20 100644 --- a/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs +++ b/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs @@ -18,7 +18,8 @@ namespace NzbDrone.Core.IndexerVersions { public interface IIndexerDefinitionUpdateService { - List All(); + List All(); + List AllForImplementation(string implementation); CardigannDefinition GetCachedDefinition(string fileKey); List GetBlocklist(); } @@ -77,9 +78,9 @@ namespace NzbDrone.Core.IndexerVersions _logger = logger; } - public List All() + public List All() { - var indexerList = new List(); + var indexerList = new List(); try { @@ -87,7 +88,7 @@ namespace NzbDrone.Core.IndexerVersions try { var request = new HttpRequest($"https://indexers.prowlarr.com/{DEFINITION_BRANCH}/{DEFINITION_VERSION}"); - var response = _httpClient.Get>(request); + var response = _httpClient.Get>(request); indexerList = response.Resource.Where(i => !_defintionBlocklist.Contains(i.File)).ToList(); } catch @@ -110,6 +111,11 @@ namespace NzbDrone.Core.IndexerVersions return indexerList; } + public List AllForImplementation(string implementation) + { + return All().Where(d => d.Implementation == implementation).ToList(); + } + public CardigannDefinition GetCachedDefinition(string fileKey) { if (string.IsNullOrEmpty(fileKey)) @@ -127,7 +133,7 @@ namespace NzbDrone.Core.IndexerVersions return _defintionBlocklist; } - private List ReadDefinitionsFromDisk(List defs, string path, SearchOption options = SearchOption.TopDirectoryOnly) + private List ReadDefinitionsFromDisk(List defs, string path, SearchOption options = SearchOption.TopDirectoryOnly) { var indexerList = defs; @@ -144,7 +150,7 @@ namespace NzbDrone.Core.IndexerVersions try { var definitionString = File.ReadAllText(file.FullName); - var definition = _deserializer.Deserialize(definitionString); + var definition = _deserializer.Deserialize(definitionString); definition.File = Path.GetFileNameWithoutExtension(file.Name); @@ -242,6 +248,11 @@ namespace NzbDrone.Core.IndexerVersions definition.Login.Method = "form"; } + if (definition.Search == null) + { + definition.Search = new SearchBlock(); + } + if (definition.Search.Paths == null) { definition.Search.Paths = new List(); @@ -283,7 +294,7 @@ namespace NzbDrone.Core.IndexerVersions var startupFolder = _appFolderInfo.AppDataFolder; var request = new HttpRequest($"https://indexers.prowlarr.com/{DEFINITION_BRANCH}/{DEFINITION_VERSION}"); - var response = _httpClient.Get>(request); + var response = _httpClient.Get>(request); var currentDefs = _versionService.All().ToDictionary(x => x.DefinitionId, x => x.Sha); diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannMetaDef.cs b/src/NzbDrone.Core/IndexerVersions/IndexerMetaDefinition.cs similarity index 76% rename from src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannMetaDef.cs rename to src/NzbDrone.Core/IndexerVersions/IndexerMetaDefinition.cs index 32ca9ee67..82aeeeae0 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannMetaDef.cs +++ b/src/NzbDrone.Core/IndexerVersions/IndexerMetaDefinition.cs @@ -1,16 +1,18 @@ using System.Collections.Generic; +using NzbDrone.Core.Indexers.Cardigann; -namespace NzbDrone.Core.Indexers.Cardigann +namespace NzbDrone.Core.IndexerVersions { - public class CardigannMetaDefinition + public class IndexerMetaDefinition { - public CardigannMetaDefinition() + public IndexerMetaDefinition() { Legacylinks = new List(); } public string Id { get; set; } public string File { get; set; } + public string Implementation { get; set; } public string Name { get; set; } public string Description { get; set; } public string Type { get; set; } @@ -18,8 +20,8 @@ namespace NzbDrone.Core.Indexers.Cardigann public string Encoding { get; set; } public List Links { get; set; } public List Legacylinks { get; set; } - public List Settings { get; set; } public string Sha { get; set; } + public List Settings { get; set; } public LoginBlock Login { get; set; } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/AlphaRatio.cs b/src/NzbDrone.Core/Indexers/Definitions/AlphaRatio.cs index 1b1329374..05a13380a 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/AlphaRatio.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/AlphaRatio.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions @@ -9,12 +10,9 @@ namespace NzbDrone.Core.Indexers.Definitions public class AlphaRatio : Gazelle.Gazelle { public override string Name => "AlphaRatio"; - public override string[] IndexerUrls => new string[] { "https://alpharatio.cc/" }; - public override string Description => "AlphaRatio(AR) is a Private Torrent Tracker for 0DAY / GENERAL"; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public AlphaRatio(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public AlphaRatio(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -28,54 +26,6 @@ namespace NzbDrone.Core.Indexers.Definitions Capabilities = Capabilities }; } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVSD, "TvSD"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVHD, "TvHD"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TVUHD, "TvUHD"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVSD, "TvDVDRip"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVSD, "TvPackSD"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.TVHD, "TvPackHD"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.TVUHD, "TvPackUHD"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.MoviesSD, "MovieSD"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.MoviesHD, "MovieHD"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.MoviesUHD, "MovieUHD"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.MoviesSD, "MoviePackSD"); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.MoviesHD, "MoviePackHD"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.MoviesUHD, "MoviePackUHD"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.XXX, "MovieXXX"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.MoviesBluRay, "Bluray"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.TVAnime, "AnimeSD"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.TVAnime, "AnimeHD"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.PCGames, "GamesPC"); - caps.Categories.AddCategoryMapping(19, NewznabStandardCategory.ConsoleXBox, "GamesxBox"); - caps.Categories.AddCategoryMapping(20, NewznabStandardCategory.ConsolePS4, "GamesPS"); - caps.Categories.AddCategoryMapping(21, NewznabStandardCategory.ConsoleWii, "GamesNin"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.PC0day, "AppsWindows"); - caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.PCMac, "AppsMAC"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.PC0day, "AppsLinux"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.PCMobileOther, "AppsMobile"); - caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.XXX, "0dayXXX"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.Books, "eBook"); - caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.AudioAudiobook, "AudioBook"); - caps.Categories.AddCategoryMapping(29, NewznabStandardCategory.AudioOther, "Music"); - caps.Categories.AddCategoryMapping(30, NewznabStandardCategory.Other, "Misc"); - - return caps; - } } public class AlphaRatioRequestGenerator : Gazelle.GazelleRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/Anidub.cs b/src/NzbDrone.Core/Indexers/Definitions/Anidub.cs index 08b918aa1..0ac0ac37f 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Anidub.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Anidub.cs @@ -17,6 +17,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -27,16 +28,15 @@ namespace NzbDrone.Core.Indexers.Definitions public class Anidub : TorrentIndexerBase { public override string Name => "Anidub"; - public override string[] IndexerUrls => new string[] { "https://tr.anidub.com/" }; - public override string Description => "Anidub is russian anime voiceover group and eponymous anime tracker."; - public override string Language => "ru-RU"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.SemiPrivate; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public Anidub(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Anidub(IIndexerHttpClient httpClient, + IEventAggregator eventAggregator, + IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, + IConfigService configService, + Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -99,47 +99,6 @@ namespace NzbDrone.Core.Indexers.Definitions return true; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVAnime, "Аниме TV"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Movies, "Аниме Фильмы"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVAnime, "Аниме OVA"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVAnime, "Аниме OVA |- Аниме ONA"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.TV, "Дорамы / Японские Сериалы и Фильмы"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.TV, "Дорамы / Корейские Сериалы и Фильмы"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.TV, "Дорамы / Китайские Сериалы и Фильмы"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.TV, "Дорамы"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.TVAnime, "Аниме TV / Аниме Ongoing"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.TVAnime, "Аниме TV / Многосерийный сёнэн"); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.Other, "Аниме Ongoing Анонсы"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.XXX, "18+"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.TVAnime, "Аниме TV / Законченные сериалы"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.BooksComics, "Манга"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.Audio, "OST"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.Audio, "Подкасты"); - return caps; - } } public class AnidubRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs b/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs index e698adb33..093692f7b 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/AnimeBytes.cs @@ -17,6 +17,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -27,16 +28,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class AnimeBytes : TorrentIndexerBase { public override string Name => "AnimeBytes"; - public override string[] IndexerUrls => new string[] { "https://animebytes.tv/" }; - public override string Description => "AnimeBytes (AB) is the largest private torrent tracker that specialises in anime and anime-related content."; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public AnimeBytes(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public AnimeBytes(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -54,48 +49,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("anime[tv_series]", NewznabStandardCategory.TVAnime, "TV Series"); - caps.Categories.AddCategoryMapping("anime[tv_special]", NewznabStandardCategory.TVAnime, "TV Special"); - caps.Categories.AddCategoryMapping("anime[ova]", NewznabStandardCategory.TVAnime, "OVA"); - caps.Categories.AddCategoryMapping("anime[ona]", NewznabStandardCategory.TVAnime, "ONA"); - caps.Categories.AddCategoryMapping("anime[dvd_special]", NewznabStandardCategory.TVAnime, "DVD Special"); - caps.Categories.AddCategoryMapping("anime[bd_special]", NewznabStandardCategory.TVAnime, "BD Special"); - caps.Categories.AddCategoryMapping("anime[movie]", NewznabStandardCategory.Movies, "Movie"); - caps.Categories.AddCategoryMapping("audio", NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping("gamec[game]", NewznabStandardCategory.PCGames, "Game"); - caps.Categories.AddCategoryMapping("gamec[visual_novel]", NewznabStandardCategory.PCGames, "Game Visual Novel"); - caps.Categories.AddCategoryMapping("printedtype[manga]", NewznabStandardCategory.BooksComics, "Manga"); - caps.Categories.AddCategoryMapping("printedtype[oneshot]", NewznabStandardCategory.BooksComics, "Oneshot"); - caps.Categories.AddCategoryMapping("printedtype[anthology]", NewznabStandardCategory.BooksComics, "Anthology"); - caps.Categories.AddCategoryMapping("printedtype[manhwa]", NewznabStandardCategory.BooksComics, "Manhwa"); - caps.Categories.AddCategoryMapping("printedtype[light_novel]", NewznabStandardCategory.BooksComics, "Light Novel"); - caps.Categories.AddCategoryMapping("printedtype[artbook]", NewznabStandardCategory.BooksComics, "Artbook"); - - return caps; - } } public class AnimeBytesRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs b/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs index a7636df97..0cb26c3a6 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -25,16 +26,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class AnimeTorrents : TorrentIndexerBase { public override string Name => "AnimeTorrents"; - - public override string[] IndexerUrls => new string[] { "https://animetorrents.me/" }; - public override string Description => "Definitive source for anime and manga"; private string LoginUrl => Settings.BaseUrl + "login.php"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public AnimeTorrents(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public AnimeTorrents(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -94,43 +90,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesSD, "Anime Movie"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.MoviesHD, "Anime Movie HD"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVAnime, "Anime Series"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.TVAnime, "Anime Series HD"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.XXXDVD, "Hentai (censored)"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.XXXDVD, "Hentai (censored) HD"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.XXXDVD, "Hentai (un-censored)"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.XXXDVD, "Hentai (un-censored) HD"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.BooksForeign, "Light Novel"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.BooksComics, "Manga"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.BooksComics, "Manga 18+"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.TVAnime, "OVA"); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.TVAnime, "OVA HD"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.BooksComics, "Doujin Anime"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.XXXDVD, "Doujin Anime 18+"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.AudioForeign, "Doujin Music"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.BooksComics, "Doujinshi"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.BooksComics, "Doujinshi 18+"); - caps.Categories.AddCategoryMapping(19, NewznabStandardCategory.Audio, "OST"); - - return caps; - } } public class AnimeTorrentsRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/Animedia.cs b/src/NzbDrone.Core/Indexers/Definitions/Animedia.cs index 0710550ba..b35a0b131 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Animedia.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Animedia.cs @@ -13,6 +13,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -23,16 +24,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class Animedia : TorrentIndexerBase { public override string Name => "Animedia"; - public override string[] IndexerUrls => new string[] { "https://tt.animedia.tv/" }; - public override string Description => "Animedia is russian anime voiceover group and eponymous anime tracker."; - public override string Language => "ru-RU"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Public; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public Animedia(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Animedia(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -45,26 +40,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return new AnimediaParser(Settings, Capabilities.Categories) { HttpClient = _httpClient, Logger = _logger }; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime, "TV Anime"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVAnime, "OVA/ONA/Special"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TV, "Dorama"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.Movies, "Movies"); - return caps; - } } public class AnimediaRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/Anthelion.cs b/src/NzbDrone.Core/Indexers/Definitions/Anthelion.cs index f1464f07a..f94483f72 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Anthelion.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Anthelion.cs @@ -13,6 +13,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -22,17 +23,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class Anthelion : TorrentIndexerBase { public override string Name => "Anthelion"; - public override string[] IndexerUrls => new string[] { "https://anthelion.me/" }; private string LoginUrl => Settings.BaseUrl + "login.php"; - public override string Description => "A movies tracker"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public Anthelion(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Anthelion(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -101,28 +96,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("1", NewznabStandardCategory.Movies, "Film/Feature"); - caps.Categories.AddCategoryMapping("2", NewznabStandardCategory.Movies, "Film/Short"); - caps.Categories.AddCategoryMapping("3", NewznabStandardCategory.TV, "TV/Miniseries"); - caps.Categories.AddCategoryMapping("4", NewznabStandardCategory.Other, "Other"); - - return caps; - } } public class AnthelionRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/AvistaZ.cs b/src/NzbDrone.Core/Indexers/Definitions/AvistaZ.cs deleted file mode 100644 index 69721505c..000000000 --- a/src/NzbDrone.Core/Indexers/Definitions/AvistaZ.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections.Generic; -using NLog; -using NzbDrone.Common.Http; -using NzbDrone.Core.Configuration; -using NzbDrone.Core.Indexers.Definitions.Avistaz; -using NzbDrone.Core.Messaging.Events; - -namespace NzbDrone.Core.Indexers.Definitions -{ - public class AvistaZ : AvistazBase - { - public override string Name => "AvistaZ"; - public override string[] IndexerUrls => new string[] { "https://avistaz.to/" }; - public override string Description => "Aka AsiaTorrents"; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - - public AvistaZ(IIndexerRepository indexerRepository, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(indexerRepository, httpClient, eventAggregator, indexerStatusService, configService, logger) - { - } - - public override IIndexerRequestGenerator GetRequestGenerator() - { - return new AvistazRequestGenerator() - { - Settings = Settings, - HttpClient = _httpClient, - Logger = _logger, - Capabilities = Capabilities - }; - } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId, TvSearchParam.TvdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId, MovieSearchParam.TmdbId - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesUHD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesHD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesSD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVUHD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVHD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVSD); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Audio); - - return caps; - } - } -} diff --git a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazBase.cs b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/Avistaz.cs similarity index 92% rename from src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazBase.cs rename to src/NzbDrone.Core/Indexers/Definitions/Avistaz/Avistaz.cs index f0158aef4..5bc5badfa 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazBase.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/Avistaz.cs @@ -6,28 +6,31 @@ using FluentValidation.Results; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions.Avistaz { - public abstract class AvistazBase : TorrentIndexerBase + public class Avistaz : TorrentIndexerBase { + public override string Name => "Avistaz"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override string[] IndexerUrls => new string[] { "" }; protected virtual string LoginUrl => Settings.BaseUrl + "api/v1/jackett/auth"; + public override string Description => ""; public override bool SupportsRss => true; public override bool SupportsSearch => true; public override int PageSize => 50; - public override IndexerCapabilities Capabilities => SetCapabilities(); + private IIndexerRepository _indexerRepository; - public AvistazBase(IIndexerRepository indexerRepository, + public Avistaz(IIndexerRepository indexerRepository, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { _indexerRepository = indexerRepository; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/BB.cs b/src/NzbDrone.Core/Indexers/Definitions/BB.cs index 7c3b0a78f..41ce11bfa 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BB.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BB.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -27,15 +28,10 @@ namespace NzbDrone.Core.Indexers.Definitions public override string Name => "BB"; public override string[] IndexerUrls => new string[] { StringUtil.FromBase64("aHR0cHM6Ly9iYWNvbmJpdHMub3JnLw==") }; private string LoginUrl => Settings.BaseUrl + "login.php"; - public override string Description => "BB is a Private Torrent Tracker for 0DAY / GENERAL"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public BB(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public BB(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -112,50 +108,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Audio); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.AudioMP3); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.AudioLossless); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PC); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.BooksEBook); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.AudioAudiobook); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Other); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.BooksMags); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.BooksComics); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.TVAnime); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.Movies); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.TVHD); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.TVSD); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.TV); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.PCGames); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.Console); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.Other); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.Other); - - return caps; - } } public class BBRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/BakaBT.cs b/src/NzbDrone.Core/Indexers/Definitions/BakaBT.cs index 38feb1be8..99a9d1ee5 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BakaBT.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BakaBT.cs @@ -16,6 +16,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -27,15 +28,11 @@ namespace NzbDrone.Core.Indexers.Definitions { public override string Name => "BakaBT"; - public override string[] IndexerUrls => new string[] { "https://bakabt.me/" }; - public override string Description => "Anime Community"; private string LoginUrl => Settings.BaseUrl + "login.php"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public BakaBT(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public BakaBT(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -124,41 +121,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime, "Anime Series"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVAnime, "OVA"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.AudioOther, "Soundtrack"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.BooksComics, "Manga"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Movies, "Anime Movie"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.TVOther, "Live Action"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.BooksOther, "Artbook"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.AudioVideo, "Music Video"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.BooksEBook, "Light Novel"); - - return caps; - } } public class BakaBTRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/BeyondHD.cs b/src/NzbDrone.Core/Indexers/Definitions/BeyondHD.cs index 05acf60c9..ccee20356 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BeyondHD.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BeyondHD.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -25,15 +26,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class BeyondHD : TorrentIndexerBase { public override string Name => "BeyondHD"; - - public override string[] IndexerUrls => new string[] { "https://beyond-hd.me/" }; - public override string Description => "BeyondHD (BHD) is a Private Torrent Tracker for HD MOVIES / TV"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public BeyondHD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public BeyondHD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -46,26 +42,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return new BeyondHDParser(Settings, Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId, MovieSearchParam.TmdbId - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies, "Movies"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV, "TV"); - - return caps; - } } public class BeyondHDRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/BinSearch.cs b/src/NzbDrone.Core/Indexers/Definitions/BinSearch.cs index dd51ae064..943a45498 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BinSearch.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BinSearch.cs @@ -12,6 +12,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -22,17 +23,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class BinSearch : UsenetIndexerBase { public override string Name => "BinSearch"; - public override string[] IndexerUrls => new string[] { "https://binsearch.info/" }; - public override string Description => "The binary Usenet search engine"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Usenet; - public override IndexerPrivacy Privacy => IndexerPrivacy.Public; public override bool SupportsRss => false; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public BinSearch(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, nzbValidationService, logger) + public BinSearch(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, nzbValidationService, logger) { } @@ -45,31 +40,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return new BinSearchParser(Capabilities.Categories, Settings); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - return caps; - } } public class BinSearchRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/BitHDTV.cs b/src/NzbDrone.Core/Indexers/Definitions/BitHDTV.cs index e3a90251d..726ba77fc 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BitHDTV.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BitHDTV.cs @@ -14,6 +14,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -25,16 +26,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class BitHDTV : TorrentIndexerBase { public override string Name => "BitHDTV"; - public override string[] IndexerUrls => new string[] { "https://www.bit-hdtv.com/" }; - public override string Description => "BIT-HDTV - Home of High Definition"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.GetEncoding("iso-8859-1"); public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public BitHDTV(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public BitHDTV(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -57,35 +52,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime, "Anime"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.MoviesBluRay, "Movies/Blu-ray"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVDocumentary, "Documentaries"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.AudioLossless, "HQ Audio"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.Movies, "Movies"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.AudioVideo, "Music Videos"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.Other, "Other"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVSport, "Sports"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.TV, "TV"); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.TV, "TV/Seasonpack"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.XXX, "XXX"); - - return caps; - } } public class BitHDTVRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNet.cs b/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNet.cs index 45f036260..1115e5f53 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNet.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNet.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.BroadcastheNet @@ -10,22 +11,15 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet public class BroadcastheNet : TorrentIndexerBase { public override string Name => "BroadcasTheNet"; - - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; public override bool SupportsRss => true; public override bool SupportsSearch => true; public override int PageSize => 100; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public override TimeSpan RateLimit => TimeSpan.FromSeconds(5); - - public override string[] IndexerUrls => new string[] { "https://api.broadcasthe.net/" }; - public override string[] LegacyUrls => new string[] { "http://api.broadcasthe.net/" }; - public override string Description => "BroadcasTheNet (BTN) is an invite-only torrent tracker focused on TV shows"; + public override TimeSpan RateLimit => TimeSpan.FromSeconds(5); - public BroadcastheNet(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public BroadcastheNet(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -50,27 +44,5 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet { return new BroadcastheNetParser(Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - LimitsDefault = 100, - LimitsMax = 1000, - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.TvdbId, TvSearchParam.RId - } - }; - - caps.Categories.AddCategoryMapping("SD", NewznabStandardCategory.TVSD, "SD"); - caps.Categories.AddCategoryMapping("720p", NewznabStandardCategory.TVHD, "720p"); - caps.Categories.AddCategoryMapping("1080p", NewznabStandardCategory.TVHD, "1080p"); - caps.Categories.AddCategoryMapping("1080i", NewznabStandardCategory.TVHD, "1080i"); - caps.Categories.AddCategoryMapping("2160p", NewznabStandardCategory.TVHD, "2160p"); - caps.Categories.AddCategoryMapping("Portable Device", NewznabStandardCategory.TVSD, "Portable Device"); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/BrokenStones.cs b/src/NzbDrone.Core/Indexers/Definitions/BrokenStones.cs index 1ab58c181..c8d47db04 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BrokenStones.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BrokenStones.cs @@ -1,6 +1,7 @@ using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions @@ -8,31 +9,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class BrokenStones : Gazelle.Gazelle { public override string Name => "BrokenStones"; - public override string[] IndexerUrls => new string[] { "https://brokenstones.club/" }; - public override string Description => "Broken Stones is a Private site for MacOS and iOS APPS / GAMES"; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public BrokenStones(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public BrokenStones(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.PCMac, "MacOS Apps"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PCMac, "MacOS Games"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.PCMobileiOS, "iOS Apps"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.PCMobileiOS, "iOS Games"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Other, "Graphics"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.Audio, "Audio"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.Other, "Tutorials"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.Other, "Other"); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/CGPeers.cs b/src/NzbDrone.Core/Indexers/Definitions/CGPeers.cs index c82b62fa2..b9f1e27e3 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/CGPeers.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/CGPeers.cs @@ -1,6 +1,7 @@ using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions @@ -8,30 +9,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class CGPeers : Gazelle.Gazelle { public override string Name => "CGPeers"; - public override string[] IndexerUrls => new string[] { "https://cgpeers.to/" }; - public override string Description => "CGPeers is a Private Torrent Tracker for GRAPHICS SOFTWARE / TUTORIALS / ETC"; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public CGPeers(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public CGPeers(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.PCISO, "Full Applications"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PC0day, "Plugins"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Other, "Tutorials"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.Other, "Models"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Other, "Materials"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.OtherMisc, "Misc"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.Other, "GameDev"); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/Cardigann.cs b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/Cardigann.cs index 34d0f8a99..fb18a3c4d 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/Cardigann.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/Cardigann.cs @@ -19,15 +19,10 @@ namespace NzbDrone.Core.Indexers.Cardigann { public class Cardigann : TorrentIndexerBase { - private readonly IIndexerDefinitionUpdateService _definitionService; private readonly ICached _generatorCache; public override string Name => "Cardigann"; - public override string[] IndexerUrls => new string[] { "" }; - public override string Description => ""; - public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; // Page size is different per indexer, setting to 1 ensures we don't break out of paging logic // thinking its a partial page and insteaad all search_path requests are run for each indexer @@ -35,9 +30,9 @@ namespace NzbDrone.Core.Indexers.Cardigann public override IIndexerRequestGenerator GetRequestGenerator() { - var generator = _generatorCache.Get(Settings.DefinitionFile, () => + var generator = _generatorCache.Get(((IndexerDefinition)Definition).DefinitionFile, () => new CardigannRequestGenerator(_configService, - _definitionService.GetCachedDefinition(Settings.DefinitionFile), + _definitionService.GetCachedDefinition(((IndexerDefinition)Definition).DefinitionFile), _logger) { HttpClient = _httpClient, @@ -57,7 +52,7 @@ namespace NzbDrone.Core.Indexers.Cardigann public override IParseIndexerResponse GetParser() { return new CardigannParser(_configService, - _definitionService.GetCachedDefinition(Settings.DefinitionFile), + _definitionService.GetCachedDefinition(((IndexerDefinition)Definition).DefinitionFile), _logger) { Settings = Settings @@ -74,17 +69,6 @@ namespace NzbDrone.Core.Indexers.Cardigann return base.GetCookies(); } - public override IEnumerable DefaultDefinitions - { - get - { - foreach (var def in _definitionService.All()) - { - yield return GetDefinition(def); - } - } - } - public Cardigann(IIndexerDefinitionUpdateService definitionService, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, @@ -92,13 +76,12 @@ namespace NzbDrone.Core.Indexers.Cardigann IConfigService configService, ICacheManager cacheManager, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { - _definitionService = definitionService; _generatorCache = cacheManager.GetRollingCache(GetType(), "CardigannGeneratorCache", TimeSpan.FromMinutes(5)); } - private IndexerDefinition GetDefinition(CardigannMetaDefinition definition) + private IndexerDefinition GetDefinition(IndexerMetaDefinition definition) { var defaultSettings = new List { @@ -127,7 +110,8 @@ namespace NzbDrone.Core.Indexers.Cardigann Implementation = GetType().Name, IndexerUrls = definition.Links.ToArray(), LegacyUrls = definition.Legacylinks.ToArray(), - Settings = new CardigannSettings { DefinitionFile = definition.File }, + DefinitionFile = definition.File, + Settings = new CardigannSettings(), Protocol = DownloadProtocol.Torrent, Privacy = definition.Type switch { diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannDefinition.cs b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannDefinition.cs index 72d15a16c..7534a5d03 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannDefinition.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannDefinition.cs @@ -37,6 +37,7 @@ namespace NzbDrone.Core.Indexers.Cardigann public string Id { get; set; } public List Settings { get; set; } public string Name { get; set; } + public string Implementation { get; set; } public string Description { get; set; } public string Type { get; set; } public string Language { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannSettings.cs b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannSettings.cs index 9b1ef4e15..3d4dc350e 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannSettings.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannSettings.cs @@ -22,9 +22,6 @@ namespace NzbDrone.Core.Indexers.Cardigann ExtraFieldData = new Dictionary(); } - [FieldDefinition(0, Hidden = HiddenType.Hidden)] - public string DefinitionFile { get; set; } - public Dictionary ExtraFieldData { get; set; } public override NzbDroneValidationResult Validate() diff --git a/src/NzbDrone.Core/Indexers/Definitions/CinemaZ.cs b/src/NzbDrone.Core/Indexers/Definitions/CinemaZ.cs deleted file mode 100644 index 0f872ee08..000000000 --- a/src/NzbDrone.Core/Indexers/Definitions/CinemaZ.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Collections.Generic; -using NLog; -using NzbDrone.Common.Http; -using NzbDrone.Core.Configuration; -using NzbDrone.Core.Indexers.Definitions.Avistaz; -using NzbDrone.Core.Messaging.Events; - -namespace NzbDrone.Core.Indexers.Definitions -{ - public class CinemaZ : AvistazBase - { - public override string Name => "CinemaZ"; - public override string[] IndexerUrls => new string[] { "https://cinemaz.to/" }; - public override string Description => "CinemaZ (EuTorrents) is a Private Torrent Tracker for FOREIGN NON-ASIAN MOVIES."; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - - public CinemaZ(IIndexerRepository indexerRepository, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(indexerRepository, httpClient, eventAggregator, indexerStatusService, configService, logger) - { - } - - public override IIndexerRequestGenerator GetRequestGenerator() - { - return new AvistazRequestGenerator() - { - Settings = Settings, - HttpClient = _httpClient, - Logger = _logger, - Capabilities = Capabilities - }; - } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesUHD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesHD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesSD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVUHD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVHD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVSD); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Audio); - - return caps; - } - } -} diff --git a/src/NzbDrone.Core/Indexers/Definitions/ExoticaZ.cs b/src/NzbDrone.Core/Indexers/Definitions/ExoticaZ.cs deleted file mode 100644 index 608edf2a2..000000000 --- a/src/NzbDrone.Core/Indexers/Definitions/ExoticaZ.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using NLog; -using NzbDrone.Core.Configuration; -using NzbDrone.Core.Indexers.Definitions.Avistaz; -using NzbDrone.Core.Messaging.Events; - -namespace NzbDrone.Core.Indexers.Definitions -{ - public class ExoticaZ : AvistazBase - { - public override string Name => "ExoticaZ"; - public override string[] IndexerUrls => new string[] { "https://exoticaz.to/" }; - public override string Description => "ExoticaZ (YourExotic) is a Private Torrent Tracker for 3X"; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - - public ExoticaZ(IIndexerRepository indexerRepository, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(indexerRepository, httpClient, eventAggregator, indexerStatusService, configService, logger) - { - } - - public override IIndexerRequestGenerator GetRequestGenerator() - { - return new AvistazRequestGenerator() - { - Settings = Settings, - HttpClient = _httpClient, - Logger = _logger, - Capabilities = Capabilities, - }; - } - - public override IParseIndexerResponse GetParser() - { - return new ExoticaZParser(Capabilities.Categories); - } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities(); - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.XXXx264, "Video Clip"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.XXXPack, "Video Pack"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.XXXPack, "Siterip Pack"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.XXXPack, "Pornstar Pack"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.XXXDVD, "DVD"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.XXXx264, "BluRay"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.XXXImageSet, "Photo Pack"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.XXXImageSet, "Books & Magazines"); - - return caps; - } - } - - public class ExoticaZParser : AvistazParser - { - private readonly IndexerCapabilitiesCategories _categories; - - public ExoticaZParser(IndexerCapabilitiesCategories categories) - { - _categories = categories; - } - - protected override List ParseCategories(AvistazRelease row) - { - var cat = row.Category; - - return cat.SelectMany(c => _categories.MapTrackerCatToNewznab(c.Key)).ToList(); - } - } -} diff --git a/src/NzbDrone.Core/Indexers/Definitions/FileList/FileList.cs b/src/NzbDrone.Core/Indexers/Definitions/FileList/FileList.cs index 630283e80..d6de7ac46 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/FileList/FileList.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/FileList/FileList.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.FileList @@ -9,17 +10,13 @@ namespace NzbDrone.Core.Indexers.FileList public class FileList : TorrentIndexerBase { public override string Name => "FileList.io"; - public override string[] IndexerUrls => new string[] { "https://filelist.io" }; - public override string Description => "FileList (FL) is a ROMANIAN Private Torrent Tracker for 0DAY / GENERAL"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; public override bool SupportsRss => true; public override bool SupportsSearch => true; public override bool SupportsRedirect => true; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public FileList(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public FileList(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -32,61 +29,5 @@ namespace NzbDrone.Core.Indexers.FileList { return new FileListParser(Settings, Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - }, - Flags = new List - { - IndexerFlag.FreeLeech - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesSD, "Filme SD"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.MoviesDVD, "Filme DVD"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.MoviesForeign, "Filme DVD-RO"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.MoviesHD, "Filme HD"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.AudioLossless, "FLAC"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.MoviesUHD, "Filme 4K"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.XXX, "XXX"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.PC, "Programe"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.PCGames, "Jocuri PC"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.Console, "Jocuri Console"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.Audio, "Audio"); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.AudioVideo, "Videoclip"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.TVSport, "Sport"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.TV, "Desene"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.Books, "Docs"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.PC, "Linux"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.Other, "Diverse"); - caps.Categories.AddCategoryMapping(19, NewznabStandardCategory.MoviesForeign, "Filme HD-RO"); - caps.Categories.AddCategoryMapping(20, NewznabStandardCategory.MoviesBluRay, "Filme Blu-Ray"); - caps.Categories.AddCategoryMapping(21, NewznabStandardCategory.TVHD, "Seriale HD"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.PCMobileOther, "Mobile"); - caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.TVSD, "Seriale SD"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.TVAnime, "Anime"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.Movies3D, "Filme 3D"); - caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.MoviesBluRay, "Filme 4K Blu-Ray"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.TVUHD, "Seriale 4K"); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/Gazelle/Gazelle.cs b/src/NzbDrone.Core/Indexers/Definitions/Gazelle/Gazelle.cs index a30436849..a2beff795 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Gazelle/Gazelle.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Gazelle/Gazelle.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Gazelle @@ -16,14 +17,14 @@ namespace NzbDrone.Core.Indexers.Gazelle public override bool SupportsRss => true; public override bool SupportsSearch => true; public override int PageSize => 50; - public override IndexerCapabilities Capabilities => SetCapabilities(); public Gazelle(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -43,13 +44,6 @@ namespace NzbDrone.Core.Indexers.Gazelle return new GazelleParser(Settings, Capabilities); } - protected virtual IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities(); - - return caps; - } - protected override async Task DoLogin() { var requestBuilder = new HttpRequestBuilder(LoginUrl) diff --git a/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs b/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs index d94a4addd..4d5538472 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/GazelleGames.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Validation; @@ -24,16 +25,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class GazelleGames : TorrentIndexerBase { public override string Name => "GazelleGames"; - public override string[] IndexerUrls => new string[] { "https://gazellegames.net/" }; - public override string Description => "GazelleGames (GGn) is a Private Torrent Tracker for GAMES"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public GazelleGames(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public GazelleGames(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -47,145 +42,6 @@ namespace NzbDrone.Core.Indexers.Definitions return new GazelleGamesParser(Settings, Capabilities.Categories); } - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - }; - - // Apple - caps.Categories.AddCategoryMapping("Mac", NewznabStandardCategory.ConsoleOther, "Mac"); - caps.Categories.AddCategoryMapping("iOS", NewznabStandardCategory.PCMobileiOS, "iOS"); - caps.Categories.AddCategoryMapping("Apple Bandai Pippin", NewznabStandardCategory.ConsoleOther, "Apple Bandai Pippin"); - - // Google - caps.Categories.AddCategoryMapping("Android", NewznabStandardCategory.PCMobileAndroid, "Android"); - - // Microsoft - caps.Categories.AddCategoryMapping("DOS", NewznabStandardCategory.PCGames, "DOS"); - caps.Categories.AddCategoryMapping("Windows", NewznabStandardCategory.PCGames, "Windows"); - caps.Categories.AddCategoryMapping("Xbox", NewznabStandardCategory.ConsoleXBox, "Xbox"); - caps.Categories.AddCategoryMapping("Xbox 360", NewznabStandardCategory.ConsoleXBox360, "Xbox 360"); - - // Nintendo - caps.Categories.AddCategoryMapping("Game Boy", NewznabStandardCategory.ConsoleOther, "Game Boy"); - caps.Categories.AddCategoryMapping("Game Boy Advance", NewznabStandardCategory.ConsoleOther, "Game Boy Advance"); - caps.Categories.AddCategoryMapping("Game Boy Color", NewznabStandardCategory.ConsoleOther, "Game Boy Color"); - caps.Categories.AddCategoryMapping("NES", NewznabStandardCategory.ConsoleOther, "NES"); - caps.Categories.AddCategoryMapping("Nintendo 64", NewznabStandardCategory.ConsoleOther, "Nintendo 64"); - caps.Categories.AddCategoryMapping("Nintendo 3DS", NewznabStandardCategory.ConsoleOther, "Nintendo 3DS"); - caps.Categories.AddCategoryMapping("New Nintendo 3DS", NewznabStandardCategory.ConsoleOther, "New Nintendo 3DS"); - caps.Categories.AddCategoryMapping("Nintendo DS", NewznabStandardCategory.ConsoleNDS, "Nintendo DS"); - caps.Categories.AddCategoryMapping("Nintendo GameCube", NewznabStandardCategory.ConsoleOther, "Nintendo GameCube"); - caps.Categories.AddCategoryMapping("Pokemon Mini", NewznabStandardCategory.ConsoleOther, "Pokemon Mini"); - caps.Categories.AddCategoryMapping("SNES", NewznabStandardCategory.ConsoleOther, "SNES"); - caps.Categories.AddCategoryMapping("Virtual Boy", NewznabStandardCategory.ConsoleOther, "Virtual Boy"); - caps.Categories.AddCategoryMapping("Wii", NewznabStandardCategory.ConsoleWii, "Wii"); - caps.Categories.AddCategoryMapping("Wii U", NewznabStandardCategory.ConsoleWiiU, "Wii U"); - - // Sony - caps.Categories.AddCategoryMapping("PlayStation 1", NewznabStandardCategory.ConsoleOther, "PlayStation 1"); - caps.Categories.AddCategoryMapping("PlayStation 2", NewznabStandardCategory.ConsoleOther, "PlayStation 2"); - caps.Categories.AddCategoryMapping("PlayStation 3", NewznabStandardCategory.ConsolePS3, "PlayStation 3"); - caps.Categories.AddCategoryMapping("PlayStation 4", NewznabStandardCategory.ConsolePS4, "PlayStation 4"); - caps.Categories.AddCategoryMapping("PlayStation Portable", NewznabStandardCategory.ConsolePSP, "PlayStation Portable"); - caps.Categories.AddCategoryMapping("PlayStation Vita", NewznabStandardCategory.ConsolePSVita, "PlayStation Vita"); - - // Sega - caps.Categories.AddCategoryMapping("Dreamcast", NewznabStandardCategory.ConsoleOther, "Dreamcast"); - caps.Categories.AddCategoryMapping("Game Gear", NewznabStandardCategory.ConsoleOther, "Game Gear"); - caps.Categories.AddCategoryMapping("Master System", NewznabStandardCategory.ConsoleOther, "Master System"); - caps.Categories.AddCategoryMapping("Mega Drive", NewznabStandardCategory.ConsoleOther, "Mega Drive"); - caps.Categories.AddCategoryMapping("Pico", NewznabStandardCategory.ConsoleOther, "Pico"); - caps.Categories.AddCategoryMapping("Saturn", NewznabStandardCategory.ConsoleOther, "Saturn"); - caps.Categories.AddCategoryMapping("SG-1000", NewznabStandardCategory.ConsoleOther, "SG-1000"); - - // Atari - caps.Categories.AddCategoryMapping("Atari 2600", NewznabStandardCategory.ConsoleOther, "Atari 2600"); - caps.Categories.AddCategoryMapping("Atari 5200", NewznabStandardCategory.ConsoleOther, "Atari 5200"); - caps.Categories.AddCategoryMapping("Atari 7800", NewznabStandardCategory.ConsoleOther, "Atari 7800"); - caps.Categories.AddCategoryMapping("Atari Jaguar", NewznabStandardCategory.ConsoleOther, "Atari Jaguar"); - caps.Categories.AddCategoryMapping("Atari Lynx", NewznabStandardCategory.ConsoleOther, "Atari Lynx"); - caps.Categories.AddCategoryMapping("Atari ST", NewznabStandardCategory.ConsoleOther, "Atari ST"); - - // Amstrad - caps.Categories.AddCategoryMapping("Amstrad CPC", NewznabStandardCategory.ConsoleOther, "Amstrad CPC"); - - // Sinclair - caps.Categories.AddCategoryMapping("ZX Spectrum", NewznabStandardCategory.ConsoleOther, "ZX Spectrum"); - - // Spectravideo - caps.Categories.AddCategoryMapping("MSX", NewznabStandardCategory.ConsoleOther, "MSX"); - caps.Categories.AddCategoryMapping("MSX 2", NewznabStandardCategory.ConsoleOther, "MSX 2"); - - // Tiger - caps.Categories.AddCategoryMapping("Game.com", NewznabStandardCategory.ConsoleOther, "Game.com"); - caps.Categories.AddCategoryMapping("Gizmondo", NewznabStandardCategory.ConsoleOther, "Gizmondo"); - - // VTech - caps.Categories.AddCategoryMapping("V.Smile", NewznabStandardCategory.ConsoleOther, "V.Smile"); - caps.Categories.AddCategoryMapping("CreatiVision", NewznabStandardCategory.ConsoleOther, "CreatiVision"); - - // Tabletop Games - caps.Categories.AddCategoryMapping("Board Game", NewznabStandardCategory.ConsoleOther, "Board Game"); - caps.Categories.AddCategoryMapping("Card Game", NewznabStandardCategory.ConsoleOther, "Card Game"); - caps.Categories.AddCategoryMapping("Miniature Wargames", NewznabStandardCategory.ConsoleOther, "Miniature Wargames"); - caps.Categories.AddCategoryMapping("Pen and Paper RPG", NewznabStandardCategory.ConsoleOther, "Pen and Paper RPG"); - - // Other - caps.Categories.AddCategoryMapping("3DO", NewznabStandardCategory.ConsoleOther, "3DO"); - caps.Categories.AddCategoryMapping("Bandai WonderSwan", NewznabStandardCategory.ConsoleOther, "Bandai WonderSwan"); - caps.Categories.AddCategoryMapping("Bandai WonderSwan Color", NewznabStandardCategory.ConsoleOther, "Bandai WonderSwan Color"); - caps.Categories.AddCategoryMapping("Casio Loopy", NewznabStandardCategory.ConsoleOther, "Casio Loopy"); - caps.Categories.AddCategoryMapping("Casio PV-1000", NewznabStandardCategory.ConsoleOther, "Casio PV-1000"); - caps.Categories.AddCategoryMapping("Colecovision", NewznabStandardCategory.ConsoleOther, "Colecovision"); - caps.Categories.AddCategoryMapping("Commodore 64", NewznabStandardCategory.ConsoleOther, "Commodore 64"); - caps.Categories.AddCategoryMapping("Commodore 128", NewznabStandardCategory.ConsoleOther, "Commodore 128"); - caps.Categories.AddCategoryMapping("Commodore Amiga", NewznabStandardCategory.ConsoleOther, "Commodore Amiga"); - caps.Categories.AddCategoryMapping("Commodore Plus-4", NewznabStandardCategory.ConsoleOther, "Commodore Plus-4"); - caps.Categories.AddCategoryMapping("Commodore VIC-20", NewznabStandardCategory.ConsoleOther, "Commodore VIC-20"); - caps.Categories.AddCategoryMapping("Emerson Arcadia 2001", NewznabStandardCategory.ConsoleOther, "Emerson Arcadia 2001"); - caps.Categories.AddCategoryMapping("Entex Adventure Vision", NewznabStandardCategory.ConsoleOther, "Entex Adventure Vision"); - caps.Categories.AddCategoryMapping("Epoch Super Casette Vision", NewznabStandardCategory.ConsoleOther, "Epoch Super Casette Vision"); - caps.Categories.AddCategoryMapping("Fairchild Channel F", NewznabStandardCategory.ConsoleOther, "Fairchild Channel F"); - caps.Categories.AddCategoryMapping("Funtech Super Acan", NewznabStandardCategory.ConsoleOther, "Funtech Super Acan"); - caps.Categories.AddCategoryMapping("GamePark GP32", NewznabStandardCategory.ConsoleOther, "GamePark GP32"); - caps.Categories.AddCategoryMapping("General Computer Vectrex", NewznabStandardCategory.ConsoleOther, "General Computer Vectrex"); - caps.Categories.AddCategoryMapping("Interactive DVD", NewznabStandardCategory.ConsoleOther, "Interactive DVD"); - caps.Categories.AddCategoryMapping("Linux", NewznabStandardCategory.ConsoleOther, "Linux"); - caps.Categories.AddCategoryMapping("Hartung Game Master", NewznabStandardCategory.ConsoleOther, "Hartung Game Master"); - caps.Categories.AddCategoryMapping("Magnavox-Phillips Odyssey", NewznabStandardCategory.ConsoleOther, "Magnavox-Phillips Odyssey"); - caps.Categories.AddCategoryMapping("Mattel Intellivision", NewznabStandardCategory.ConsoleOther, "Mattel Intellivision"); - caps.Categories.AddCategoryMapping("Memotech MTX", NewznabStandardCategory.ConsoleOther, "Memotech MTX"); - caps.Categories.AddCategoryMapping("Miles Gordon Sam Coupe", NewznabStandardCategory.ConsoleOther, "Miles Gordon Sam Coupe"); - caps.Categories.AddCategoryMapping("NEC PC-98", NewznabStandardCategory.ConsoleOther, "NEC PC-98"); - caps.Categories.AddCategoryMapping("NEC PC-FX", NewznabStandardCategory.ConsoleOther, "NEC PC-FX"); - caps.Categories.AddCategoryMapping("NEC SuperGrafx", NewznabStandardCategory.ConsoleOther, "NEC SuperGrafx"); - caps.Categories.AddCategoryMapping("NEC TurboGrafx-16", NewznabStandardCategory.ConsoleOther, "NEC TurboGrafx-16"); - caps.Categories.AddCategoryMapping("Nokia N-Gage", NewznabStandardCategory.ConsoleOther, "Nokia N-Gage"); - caps.Categories.AddCategoryMapping("Ouya", NewznabStandardCategory.ConsoleOther, "Ouya"); - caps.Categories.AddCategoryMapping("Philips Videopac+", NewznabStandardCategory.ConsoleOther, "Philips Videopac+"); - caps.Categories.AddCategoryMapping("Phone/PDA", NewznabStandardCategory.ConsoleOther, "Phone/PDA"); - caps.Categories.AddCategoryMapping("RCA Studio II", NewznabStandardCategory.ConsoleOther, "RCA Studio II"); - caps.Categories.AddCategoryMapping("Sharp X1", NewznabStandardCategory.ConsoleOther, "Sharp X1"); - caps.Categories.AddCategoryMapping("Sharp X68000", NewznabStandardCategory.ConsoleOther, "Sharp X68000"); - caps.Categories.AddCategoryMapping("SNK Neo Geo", NewznabStandardCategory.ConsoleOther, "SNK Neo Geo"); - caps.Categories.AddCategoryMapping("SNK Neo Geo Pocket", NewznabStandardCategory.ConsoleOther, "SNK Neo Geo Pocket"); - caps.Categories.AddCategoryMapping("Taito Type X", NewznabStandardCategory.ConsoleOther, "Taito Type X"); - caps.Categories.AddCategoryMapping("Tandy Color Computer", NewznabStandardCategory.ConsoleOther, "Tandy Color Computer"); - caps.Categories.AddCategoryMapping("Tangerine Oric", NewznabStandardCategory.ConsoleOther, "Tangerine Oric"); - caps.Categories.AddCategoryMapping("Thomson MO5", NewznabStandardCategory.ConsoleOther, "Thomson MO5"); - caps.Categories.AddCategoryMapping("Watara Supervision", NewznabStandardCategory.ConsoleOther, "Watara Supervision"); - caps.Categories.AddCategoryMapping("Retro - Other", NewznabStandardCategory.ConsoleOther, "Retro - Other"); - - // special categories (real categories/not platforms) - caps.Categories.AddCategoryMapping("OST", NewznabStandardCategory.AudioOther, "OST"); - caps.Categories.AddCategoryMapping("Applications", NewznabStandardCategory.PC0day, "Applications"); - caps.Categories.AddCategoryMapping("E-Books", NewznabStandardCategory.BooksEBook, "E-Books"); - - return caps; - } - protected override async Task Test(List failures) { ((GazelleGamesRequestGenerator)GetRequestGenerator()).FetchPasskey(); diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBits.cs b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBits.cs index b5426b8ac..dde3900fd 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBits.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBits.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.HDBits @@ -9,17 +10,13 @@ namespace NzbDrone.Core.Indexers.HDBits public class HDBits : TorrentIndexerBase { public override string Name => "HDBits"; - public override string[] IndexerUrls => new string[] { "https://hdbits.org" }; - public override string Description => "Best HD Tracker"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); public override bool SupportsRedirect => true; public override int PageSize => 30; - public HDBits(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public HDBits(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -32,31 +29,5 @@ namespace NzbDrone.Core.Indexers.HDBits { return new HDBitsParser(Settings, Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.TvdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - } - }; - - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.Audio, "Audio Track"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TVDocumentary, "Documentary"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.Other, "Misc/Demo"); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies, "Movie"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVSport, "Sport"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV, "TV"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.XXX, "XXX"); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDSpace.cs b/src/NzbDrone.Core/Indexers/Definitions/HDSpace.cs index 14293fbd0..43a183112 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDSpace.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDSpace.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -25,17 +26,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class HDSpace : TorrentIndexerBase { public override string Name => "HD-Space"; - public override string[] IndexerUrls => new string[] { "https://hd-space.org/" }; private string LoginUrl => Settings.BaseUrl + "index.php?page=login"; - public override string Description => "HD-Space (HDS) is a Private Torrent Tracker for HD MOVIES / TV"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public HDSpace(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public HDSpace(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -102,47 +97,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.MoviesBluRay, "Movie / Blu-ray"); - caps.Categories.AddCategoryMapping(19, NewznabStandardCategory.MoviesHD, "Movie / 1080p"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.MoviesHD, "Movie / 720p"); - caps.Categories.AddCategoryMapping(40, NewznabStandardCategory.MoviesHD, "Movie / Remux"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.MoviesHD, "Movie / HD-DVD"); - caps.Categories.AddCategoryMapping(41, NewznabStandardCategory.MoviesUHD, "Movie / 4K UHD"); - caps.Categories.AddCategoryMapping(21, NewznabStandardCategory.TVHD, "TV Show / 720p HDTV"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.TVHD, "TV Show / 1080p HDTV"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.TVDocumentary, "Documentary / 720p"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.TVDocumentary, "Documentary / 1080p"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.TVAnime, "Animation / 720p"); - caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.TVAnime, "Animation / 1080p"); - caps.Categories.AddCategoryMapping(30, NewznabStandardCategory.AudioLossless, "Music / HQ Audio"); - caps.Categories.AddCategoryMapping(31, NewznabStandardCategory.AudioVideo, "Music / Videos"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.XXX, "XXX / 720p"); - caps.Categories.AddCategoryMapping(34, NewznabStandardCategory.XXX, "XXX / 1080p"); - caps.Categories.AddCategoryMapping(36, NewznabStandardCategory.MoviesOther, "Trailers"); - caps.Categories.AddCategoryMapping(37, NewznabStandardCategory.PC, "Software"); - caps.Categories.AddCategoryMapping(38, NewznabStandardCategory.Other, "Others"); - - return caps; - } } public class HDSpaceRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs b/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs index 0cb886afc..9710a04a4 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs @@ -14,6 +14,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -24,16 +25,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class HDTorrents : TorrentIndexerBase { public override string Name => "HD-Torrents"; - - public override string[] IndexerUrls => new string[] { "https://hdts.ru/", "https://hd-torrents.org/" }; - public override string Description => "HD-Torrents is a private torrent website with HD torrents and strict rules on their content."; private string LoginUrl => Settings.BaseUrl + "login.php"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public HDTorrents(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public HDTorrents(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -83,60 +79,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("70", NewznabStandardCategory.MoviesUHD, "Movie/UHD/Blu-Ray"); - caps.Categories.AddCategoryMapping("1", NewznabStandardCategory.MoviesHD, "Movie/Blu-Ray"); - caps.Categories.AddCategoryMapping("71", NewznabStandardCategory.MoviesUHD, "Movie/UHD/Remux"); - caps.Categories.AddCategoryMapping("2", NewznabStandardCategory.MoviesHD, "Movie/Remux"); - caps.Categories.AddCategoryMapping("5", NewznabStandardCategory.MoviesHD, "Movie/1080p/i"); - caps.Categories.AddCategoryMapping("3", NewznabStandardCategory.MoviesHD, "Movie/720p"); - caps.Categories.AddCategoryMapping("64", NewznabStandardCategory.MoviesUHD, "Movie/2160p"); - caps.Categories.AddCategoryMapping("63", NewznabStandardCategory.Audio, "Movie/Audio Track"); - - // TV Show - caps.Categories.AddCategoryMapping("72", NewznabStandardCategory.TVUHD, "TV Show/UHD/Blu-ray"); - caps.Categories.AddCategoryMapping("59", NewznabStandardCategory.TVHD, "TV Show/Blu-ray"); - caps.Categories.AddCategoryMapping("73", NewznabStandardCategory.TVUHD, "TV Show/UHD/Remux"); - caps.Categories.AddCategoryMapping("60", NewznabStandardCategory.TVHD, "TV Show/Remux"); - caps.Categories.AddCategoryMapping("30", NewznabStandardCategory.TVHD, "TV Show/1080p/i"); - caps.Categories.AddCategoryMapping("38", NewznabStandardCategory.TVHD, "TV Show/720p"); - caps.Categories.AddCategoryMapping("65", NewznabStandardCategory.TVUHD, "TV Show/2160p"); - - // Music - caps.Categories.AddCategoryMapping("44", NewznabStandardCategory.Audio, "Music/Album"); - caps.Categories.AddCategoryMapping("61", NewznabStandardCategory.AudioVideo, "Music/Blu-Ray"); - caps.Categories.AddCategoryMapping("62", NewznabStandardCategory.AudioVideo, "Music/Remux"); - caps.Categories.AddCategoryMapping("57", NewznabStandardCategory.AudioVideo, "Music/1080p/i"); - caps.Categories.AddCategoryMapping("45", NewznabStandardCategory.AudioVideo, "Music/720p"); - caps.Categories.AddCategoryMapping("66", NewznabStandardCategory.AudioVideo, "Music/2160p"); - - // XXX - caps.Categories.AddCategoryMapping("58", NewznabStandardCategory.XXX, "XXX/Blu-ray"); - caps.Categories.AddCategoryMapping("74", NewznabStandardCategory.XXX, "XXX/UHD/Blu-ray"); - caps.Categories.AddCategoryMapping("48", NewznabStandardCategory.XXX, "XXX/1080p/i"); - caps.Categories.AddCategoryMapping("47", NewznabStandardCategory.XXX, "XXX/720p"); - caps.Categories.AddCategoryMapping("67", NewznabStandardCategory.XXX, "XXX/2160p"); - - return caps; - } } public class HDTorrentsRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/Headphones/Headphones.cs b/src/NzbDrone.Core/Indexers/Definitions/Headphones/Headphones.cs index 65a0734af..75fdd0214 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Headphones/Headphones.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Headphones/Headphones.cs @@ -7,6 +7,7 @@ using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Headphones @@ -16,10 +17,6 @@ namespace NzbDrone.Core.Indexers.Headphones public override string Name => "Headphones VIP"; public override DownloadProtocol Protocol => DownloadProtocol.Usenet; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override string[] IndexerUrls => new string[] { "https://indexer.codeshy.com" }; - public override string Description => "A Private Usenet indexer for music"; - public override IndexerCapabilities Capabilities => SetCapabilities(); public override IIndexerRequestGenerator GetRequestGenerator() { @@ -36,8 +33,8 @@ namespace NzbDrone.Core.Indexers.Headphones return new HeadphonesRssParser(Capabilities.Categories); } - public Headphones(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, nzbValidationService, logger) + public Headphones(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, nzbValidationService, logger) { } @@ -74,22 +71,5 @@ namespace NzbDrone.Core.Indexers.Headphones return downloadBytes; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - }; - - caps.Categories.AddCategoryMapping(3000, NewznabStandardCategory.Audio); - caps.Categories.AddCategoryMapping(3010, NewznabStandardCategory.AudioMP3); - caps.Categories.AddCategoryMapping(3040, NewznabStandardCategory.AudioLossless); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs b/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs index d64ee7560..7c9dbafb6 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/IPTorrents.cs @@ -10,6 +10,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -20,27 +21,10 @@ namespace NzbDrone.Core.Indexers.Definitions { public override string Name => "IPTorrents"; - public override string[] IndexerUrls => new string[] - { - "https://iptorrents.com/", - "https://iptorrents.me/", - "https://nemo.iptorrents.com/", - "https://ipt.getcrazy.me/", - "https://ipt.findnemo.net/", - "https://ipt.beelyrics.net/", - "https://ipt.venom.global/", - "https://ipt.workisboring.net/", - "https://ipt.lol/", - "https://ipt.cool/", - "https://ipt.world/" - }; - public override string Description => "IPTorrents (IPT) is a Private Torrent Tracker for 0DAY / GENERAL."; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public IPTorrents(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public IPTorrents(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -58,102 +42,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return CookieUtil.CookieHeaderToDictionary(Settings.Cookie); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(72, NewznabStandardCategory.Movies, "Movies"); - caps.Categories.AddCategoryMapping(87, NewznabStandardCategory.Movies3D, "Movie/3D"); - caps.Categories.AddCategoryMapping(77, NewznabStandardCategory.MoviesSD, "Movie/480p"); - caps.Categories.AddCategoryMapping(101, NewznabStandardCategory.MoviesUHD, "Movie/4K"); - caps.Categories.AddCategoryMapping(89, NewznabStandardCategory.MoviesHD, "Movie/BD-R"); - caps.Categories.AddCategoryMapping(90, NewznabStandardCategory.MoviesSD, "Movie/BD-Rip"); - caps.Categories.AddCategoryMapping(96, NewznabStandardCategory.MoviesSD, "Movie/Cam"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.MoviesDVD, "Movie/DVD-R"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.MoviesBluRay, "Movie/HD/Bluray"); - caps.Categories.AddCategoryMapping(54, NewznabStandardCategory.Movies, "Movie/Kids"); - caps.Categories.AddCategoryMapping(62, NewznabStandardCategory.MoviesSD, "Movie/MP4"); - caps.Categories.AddCategoryMapping(38, NewznabStandardCategory.MoviesForeign, "Movie/Non-English"); - caps.Categories.AddCategoryMapping(68, NewznabStandardCategory.Movies, "Movie/Packs"); - caps.Categories.AddCategoryMapping(20, NewznabStandardCategory.MoviesWEBDL, "Movie/Web-DL"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.MoviesSD, "Movie/Xvid"); - caps.Categories.AddCategoryMapping(100, NewznabStandardCategory.Movies, "Movie/x265"); - - caps.Categories.AddCategoryMapping(73, NewznabStandardCategory.TV, "TV"); - caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.TVDocumentary, "TV/Documentaries"); - caps.Categories.AddCategoryMapping(55, NewznabStandardCategory.TVSport, "Sports"); - caps.Categories.AddCategoryMapping(78, NewznabStandardCategory.TVSD, "TV/480p"); - caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.TVHD, "TV/BD"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.TVSD, "TV/DVD-R"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.TVSD, "TV/DVD-Rip"); - caps.Categories.AddCategoryMapping(66, NewznabStandardCategory.TVSD, "TV/Mobile"); - caps.Categories.AddCategoryMapping(82, NewznabStandardCategory.TVForeign, "TV/Non-English"); - caps.Categories.AddCategoryMapping(65, NewznabStandardCategory.TV, "TV/Packs"); - caps.Categories.AddCategoryMapping(83, NewznabStandardCategory.TVForeign, "TV/Packs/Non-English"); - caps.Categories.AddCategoryMapping(79, NewznabStandardCategory.TVSD, "TV/SD/x264"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.TVWEBDL, "TV/Web-DL"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVHD, "TV/x264"); - caps.Categories.AddCategoryMapping(99, NewznabStandardCategory.TVHD, "TV/x265"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVSD, "TV/Xvid"); - - caps.Categories.AddCategoryMapping(74, NewznabStandardCategory.Console, "Games"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.ConsoleOther, "Games/Mixed"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.ConsoleNDS, "Games/Nintendo DS"); - caps.Categories.AddCategoryMapping(43, NewznabStandardCategory.PCISO, "Games/PC-ISO"); - caps.Categories.AddCategoryMapping(45, NewznabStandardCategory.PCGames, "Games/PC-Rip"); - caps.Categories.AddCategoryMapping(71, NewznabStandardCategory.ConsolePS3, "Games/PS3"); - caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.ConsoleWii, "Games/Wii"); - caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.ConsoleXBox360, "Games/Xbox-360"); - - caps.Categories.AddCategoryMapping(75, NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.AudioMP3, "Music/Audio"); - caps.Categories.AddCategoryMapping(80, NewznabStandardCategory.AudioLossless, "Music/Flac"); - caps.Categories.AddCategoryMapping(93, NewznabStandardCategory.Audio, "Music/Packs"); - caps.Categories.AddCategoryMapping(37, NewznabStandardCategory.AudioVideo, "Music/Video"); - caps.Categories.AddCategoryMapping(21, NewznabStandardCategory.AudioVideo, "Podcast"); - - caps.Categories.AddCategoryMapping(76, NewznabStandardCategory.Other, "Other/Miscellaneous"); - caps.Categories.AddCategoryMapping(60, NewznabStandardCategory.TVAnime, "Anime"); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.PC0day, "Appz"); - caps.Categories.AddCategoryMapping(86, NewznabStandardCategory.PC0day, "Appz/Non-English"); - caps.Categories.AddCategoryMapping(64, NewznabStandardCategory.AudioAudiobook, "AudioBook"); - caps.Categories.AddCategoryMapping(35, NewznabStandardCategory.Books, "Books"); - caps.Categories.AddCategoryMapping(102, NewznabStandardCategory.Books, "Books/Non-English"); - caps.Categories.AddCategoryMapping(94, NewznabStandardCategory.BooksComics, "Books/Comics"); - caps.Categories.AddCategoryMapping(95, NewznabStandardCategory.BooksOther, "Books/Educational"); - caps.Categories.AddCategoryMapping(98, NewznabStandardCategory.Other, "Other/Fonts"); - caps.Categories.AddCategoryMapping(69, NewznabStandardCategory.PCMac, "Appz/Mac"); - caps.Categories.AddCategoryMapping(92, NewznabStandardCategory.BooksMags, "Books/Magazines & Newspapers"); - caps.Categories.AddCategoryMapping(58, NewznabStandardCategory.PCMobileOther, "Appz/Mobile"); - caps.Categories.AddCategoryMapping(36, NewznabStandardCategory.Other, "Other/Pics/Wallpapers"); - - caps.Categories.AddCategoryMapping(88, NewznabStandardCategory.XXX, "XXX"); - caps.Categories.AddCategoryMapping(85, NewznabStandardCategory.XXXOther, "XXX/Magazines"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.XXX, "XXX/Movie"); - caps.Categories.AddCategoryMapping(81, NewznabStandardCategory.XXX, "XXX/Movie/0Day"); - caps.Categories.AddCategoryMapping(91, NewznabStandardCategory.XXXPack, "XXX/Packs"); - caps.Categories.AddCategoryMapping(84, NewznabStandardCategory.XXXImageSet, "XXX/Pics/Wallpapers"); - return caps; - } } public class IPTorrentsRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/ImmortalSeed.cs b/src/NzbDrone.Core/Indexers/Definitions/ImmortalSeed.cs index 6eeb09599..e7c2c1ec2 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/ImmortalSeed.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/ImmortalSeed.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -26,16 +27,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class ImmortalSeed : TorrentIndexerBase { public override string Name => "ImmortalSeed"; - - public override string[] IndexerUrls => new string[] { "https://immortalseed.me/" }; - public override string Description => "ImmortalSeed (iS) is a Private Torrent Tracker for MOVIES / TV / GENERAL"; private string LoginUrl => Settings.BaseUrl + "takelogin.php"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public ImmortalSeed(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public ImmortalSeed(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -90,74 +86,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Other, "Nuked"); - caps.Categories.AddCategoryMapping(32, NewznabStandardCategory.TVAnime, "Anime"); - caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.PC, "Apps"); - caps.Categories.AddCategoryMapping(35, NewznabStandardCategory.AudioAudiobook, "Audiobooks"); - caps.Categories.AddCategoryMapping(31, NewznabStandardCategory.TV, "Childrens/Cartoons"); - caps.Categories.AddCategoryMapping(54, NewznabStandardCategory.TVDocumentary, "Documentary - HD"); - caps.Categories.AddCategoryMapping(41, NewznabStandardCategory.BooksComics, "Comics"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.PCGames, "Games"); - caps.Categories.AddCategoryMapping(29, NewznabStandardCategory.ConsoleXBox, "Games Xbox"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.PCGames, "Games-PC Rips"); - caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.ConsolePS4, "Games-PSx"); - caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.PCMobileOther, "Mobile"); - caps.Categories.AddCategoryMapping(59, NewznabStandardCategory.MoviesUHD, "Movies-4k"); - caps.Categories.AddCategoryMapping(60, NewznabStandardCategory.MoviesForeign, "Non-English 4k Movies"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.MoviesHD, "Movies HD"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.MoviesForeign, "Movies HD Non-English"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.MoviesSD, "TS/CAM/PPV"); - caps.Categories.AddCategoryMapping(34, NewznabStandardCategory.MoviesForeign, "Movies Low Def Non-English"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.MoviesSD, "Movies-SD"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.MoviesForeign, "Movies SD Non-English"); - caps.Categories.AddCategoryMapping(30, NewznabStandardCategory.AudioOther, "Music"); - caps.Categories.AddCategoryMapping(37, NewznabStandardCategory.AudioLossless, "FLAC"); - caps.Categories.AddCategoryMapping(36, NewznabStandardCategory.AudioMP3, "MP3"); - caps.Categories.AddCategoryMapping(39, NewznabStandardCategory.AudioOther, "Music Other"); - caps.Categories.AddCategoryMapping(38, NewznabStandardCategory.AudioVideo, "Music Video"); - caps.Categories.AddCategoryMapping(45, NewznabStandardCategory.Other, "Other"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.TVSport, "Sports Tv"); - caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.TVSport, "Sports Fitness-Instructional"); - caps.Categories.AddCategoryMapping(58, NewznabStandardCategory.TVSport, "Olympics"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.TVSD, "TV - 480p"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.TVHD, "TV - High Definition"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.TVSD, "TV - Standard Definition - x264"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.TVSD, "TV - Standard Definition - XviD"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVHD, "TV Season Packs - HD"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.TVSD, "TV Season Packs - SD"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.BooksEBook, "Ebooks"); - caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.PCGames, "Games-PC ISO"); - caps.Categories.AddCategoryMapping(46, NewznabStandardCategory.BooksMags, "Magazines"); - caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.PCMobileiOS, "IOS"); - caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.PCMobileAndroid, "Android"); - caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.PC0day, "Windows"); - caps.Categories.AddCategoryMapping(53, NewznabStandardCategory.TVDocumentary, "Documentary - SD"); - - return caps; - } } public class ImmortalSeedRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/MoreThanTV.cs b/src/NzbDrone.Core/Indexers/Definitions/MoreThanTV.cs index 2db6042c5..a3a5e3cff 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/MoreThanTV.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/MoreThanTV.cs @@ -16,6 +16,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -26,15 +27,11 @@ namespace NzbDrone.Core.Indexers.Definitions; public class MoreThanTV : TorrentIndexerBase { public override string Name => "MoreThanTV"; - public override string[] IndexerUrls => new[] { "https://www.morethantv.me/" }; - public override string Description => "Private torrent tracker for TV / MOVIES"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); public override bool FollowRedirect => true; - public MoreThanTV(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public MoreThanTV(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -47,26 +44,6 @@ public class MoreThanTV : TorrentIndexerBase Settings = Settings }; - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies, "Movies"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV, "TV"); - - return caps; - } - protected override IDictionary GetCookies() { return CookieUtil.CookieHeaderToDictionary(Settings.Cookie); diff --git a/src/NzbDrone.Core/Indexers/Definitions/MyAnonamouse.cs b/src/NzbDrone.Core/Indexers/Definitions/MyAnonamouse.cs index 6a476d815..d93ec2310 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/MyAnonamouse.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/MyAnonamouse.cs @@ -16,6 +16,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -28,15 +29,10 @@ namespace NzbDrone.Core.Indexers.Definitions private static readonly Regex TorrentIdRegex = new Regex(@"tor/download.php\?tid=(?\d+)$"); public override string Name => "MyAnonamouse"; - - public override string[] IndexerUrls => new string[] { "https://www.myanonamouse.net/" }; - public override string Description => "MyAnonaMouse (MAM) is a large ebook and audiobook tracker."; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public MyAnonamouse(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public MyAnonamouse(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -95,114 +91,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return CookieUtil.CookieHeaderToDictionary("mam_id=" + Settings.MamId); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("13", NewznabStandardCategory.AudioAudiobook, "AudioBooks"); - caps.Categories.AddCategoryMapping("14", NewznabStandardCategory.BooksEBook, "E-Books"); - caps.Categories.AddCategoryMapping("15", NewznabStandardCategory.AudioAudiobook, "Musicology"); - caps.Categories.AddCategoryMapping("16", NewznabStandardCategory.AudioAudiobook, "Radio"); - caps.Categories.AddCategoryMapping("39", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Action/Adventure"); - caps.Categories.AddCategoryMapping("49", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Art"); - caps.Categories.AddCategoryMapping("50", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Biographical"); - caps.Categories.AddCategoryMapping("83", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Business"); - caps.Categories.AddCategoryMapping("51", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Computer/Internet"); - caps.Categories.AddCategoryMapping("97", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Crafts"); - caps.Categories.AddCategoryMapping("40", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Crime/Thriller"); - caps.Categories.AddCategoryMapping("41", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Fantasy"); - caps.Categories.AddCategoryMapping("106", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Food"); - caps.Categories.AddCategoryMapping("42", NewznabStandardCategory.AudioAudiobook, "Audiobooks - General Fiction"); - caps.Categories.AddCategoryMapping("52", NewznabStandardCategory.AudioAudiobook, "Audiobooks - General Non-Fic"); - caps.Categories.AddCategoryMapping("98", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Historical Fiction"); - caps.Categories.AddCategoryMapping("54", NewznabStandardCategory.AudioAudiobook, "Audiobooks - History"); - caps.Categories.AddCategoryMapping("55", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Home/Garden"); - caps.Categories.AddCategoryMapping("43", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Horror"); - caps.Categories.AddCategoryMapping("99", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Humor"); - caps.Categories.AddCategoryMapping("84", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Instructional"); - caps.Categories.AddCategoryMapping("44", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Juvenile"); - caps.Categories.AddCategoryMapping("56", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Language"); - caps.Categories.AddCategoryMapping("45", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Literary Classics"); - caps.Categories.AddCategoryMapping("57", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Math/Science/Tech"); - caps.Categories.AddCategoryMapping("85", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Medical"); - caps.Categories.AddCategoryMapping("87", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Mystery"); - caps.Categories.AddCategoryMapping("119", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Nature"); - caps.Categories.AddCategoryMapping("88", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Philosophy"); - caps.Categories.AddCategoryMapping("58", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Pol/Soc/Relig"); - caps.Categories.AddCategoryMapping("59", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Recreation"); - caps.Categories.AddCategoryMapping("46", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Romance"); - caps.Categories.AddCategoryMapping("47", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Science Fiction"); - caps.Categories.AddCategoryMapping("53", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Self-Help"); - caps.Categories.AddCategoryMapping("89", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Travel/Adventure"); - caps.Categories.AddCategoryMapping("100", NewznabStandardCategory.AudioAudiobook, "Audiobooks - True Crime"); - caps.Categories.AddCategoryMapping("108", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Urban Fantasy"); - caps.Categories.AddCategoryMapping("48", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Western"); - caps.Categories.AddCategoryMapping("111", NewznabStandardCategory.AudioAudiobook, "Audiobooks - Young Adult"); - caps.Categories.AddCategoryMapping("60", NewznabStandardCategory.BooksEBook, "Ebooks - Action/Adventure"); - caps.Categories.AddCategoryMapping("71", NewznabStandardCategory.BooksEBook, "Ebooks - Art"); - caps.Categories.AddCategoryMapping("72", NewznabStandardCategory.BooksEBook, "Ebooks - Biographical"); - caps.Categories.AddCategoryMapping("90", NewznabStandardCategory.BooksEBook, "Ebooks - Business"); - caps.Categories.AddCategoryMapping("61", NewznabStandardCategory.BooksComics, "Ebooks - Comics/Graphic novels"); - caps.Categories.AddCategoryMapping("73", NewznabStandardCategory.BooksEBook, "Ebooks - Computer/Internet"); - caps.Categories.AddCategoryMapping("101", NewznabStandardCategory.BooksEBook, "Ebooks - Crafts"); - caps.Categories.AddCategoryMapping("62", NewznabStandardCategory.BooksEBook, "Ebooks - Crime/Thriller"); - caps.Categories.AddCategoryMapping("63", NewznabStandardCategory.BooksEBook, "Ebooks - Fantasy"); - caps.Categories.AddCategoryMapping("107", NewznabStandardCategory.BooksEBook, "Ebooks - Food"); - caps.Categories.AddCategoryMapping("64", NewznabStandardCategory.BooksEBook, "Ebooks - General Fiction"); - caps.Categories.AddCategoryMapping("74", NewznabStandardCategory.BooksEBook, "Ebooks - General Non-Fiction"); - caps.Categories.AddCategoryMapping("102", NewznabStandardCategory.BooksEBook, "Ebooks - Historical Fiction"); - caps.Categories.AddCategoryMapping("76", NewznabStandardCategory.BooksEBook, "Ebooks - History"); - caps.Categories.AddCategoryMapping("77", NewznabStandardCategory.BooksEBook, "Ebooks - Home/Garden"); - caps.Categories.AddCategoryMapping("65", NewznabStandardCategory.BooksEBook, "Ebooks - Horror"); - caps.Categories.AddCategoryMapping("103", NewznabStandardCategory.BooksEBook, "Ebooks - Humor"); - caps.Categories.AddCategoryMapping("115", NewznabStandardCategory.BooksEBook, "Ebooks - Illusion/Magic"); - caps.Categories.AddCategoryMapping("91", NewznabStandardCategory.BooksEBook, "Ebooks - Instructional"); - caps.Categories.AddCategoryMapping("66", NewznabStandardCategory.BooksEBook, "Ebooks - Juvenile"); - caps.Categories.AddCategoryMapping("78", NewznabStandardCategory.BooksEBook, "Ebooks - Language"); - caps.Categories.AddCategoryMapping("67", NewznabStandardCategory.BooksEBook, "Ebooks - Literary Classics"); - caps.Categories.AddCategoryMapping("79", NewznabStandardCategory.BooksMags, "Ebooks - Magazines/Newspapers"); - caps.Categories.AddCategoryMapping("80", NewznabStandardCategory.BooksTechnical, "Ebooks - Math/Science/Tech"); - caps.Categories.AddCategoryMapping("92", NewznabStandardCategory.BooksEBook, "Ebooks - Medical"); - caps.Categories.AddCategoryMapping("118", NewznabStandardCategory.BooksEBook, "Ebooks - Mixed Collections"); - caps.Categories.AddCategoryMapping("94", NewznabStandardCategory.BooksEBook, "Ebooks - Mystery"); - caps.Categories.AddCategoryMapping("120", NewznabStandardCategory.BooksEBook, "Ebooks - Nature"); - caps.Categories.AddCategoryMapping("95", NewznabStandardCategory.BooksEBook, "Ebooks - Philosophy"); - caps.Categories.AddCategoryMapping("81", NewznabStandardCategory.BooksEBook, "Ebooks - Pol/Soc/Relig"); - caps.Categories.AddCategoryMapping("82", NewznabStandardCategory.BooksEBook, "Ebooks - Recreation"); - caps.Categories.AddCategoryMapping("68", NewznabStandardCategory.BooksEBook, "Ebooks - Romance"); - caps.Categories.AddCategoryMapping("69", NewznabStandardCategory.BooksEBook, "Ebooks - Science Fiction"); - caps.Categories.AddCategoryMapping("75", NewznabStandardCategory.BooksEBook, "Ebooks - Self-Help"); - caps.Categories.AddCategoryMapping("96", NewznabStandardCategory.BooksEBook, "Ebooks - Travel/Adventure"); - caps.Categories.AddCategoryMapping("104", NewznabStandardCategory.BooksEBook, "Ebooks - True Crime"); - caps.Categories.AddCategoryMapping("109", NewznabStandardCategory.BooksEBook, "Ebooks - Urban Fantasy"); - caps.Categories.AddCategoryMapping("70", NewznabStandardCategory.BooksEBook, "Ebooks - Western"); - caps.Categories.AddCategoryMapping("112", NewznabStandardCategory.BooksEBook, "Ebooks - Young Adult"); - caps.Categories.AddCategoryMapping("19", NewznabStandardCategory.AudioAudiobook, "Guitar/Bass Tabs"); - caps.Categories.AddCategoryMapping("20", NewznabStandardCategory.AudioAudiobook, "Individual Sheet"); - caps.Categories.AddCategoryMapping("24", NewznabStandardCategory.AudioAudiobook, "Individual Sheet MP3"); - caps.Categories.AddCategoryMapping("126", NewznabStandardCategory.AudioAudiobook, "Instructional Book with Video"); - caps.Categories.AddCategoryMapping("22", NewznabStandardCategory.AudioAudiobook, "Instructional Media - Music"); - caps.Categories.AddCategoryMapping("113", NewznabStandardCategory.AudioAudiobook, "Lick Library - LTP/Jam With"); - caps.Categories.AddCategoryMapping("114", NewznabStandardCategory.AudioAudiobook, "Lick Library - Techniques/QL"); - caps.Categories.AddCategoryMapping("17", NewznabStandardCategory.AudioAudiobook, "Music - Complete Editions"); - caps.Categories.AddCategoryMapping("26", NewznabStandardCategory.AudioAudiobook, "Music Book"); - caps.Categories.AddCategoryMapping("27", NewznabStandardCategory.AudioAudiobook, "Music Book MP3"); - caps.Categories.AddCategoryMapping("30", NewznabStandardCategory.AudioAudiobook, "Sheet Collection"); - caps.Categories.AddCategoryMapping("31", NewznabStandardCategory.AudioAudiobook, "Sheet Collection MP3"); - caps.Categories.AddCategoryMapping("127", NewznabStandardCategory.AudioAudiobook, "Radio - Comedy"); - caps.Categories.AddCategoryMapping("130", NewznabStandardCategory.AudioAudiobook, "Radio - Drama"); - caps.Categories.AddCategoryMapping("128", NewznabStandardCategory.AudioAudiobook, "Radio - Factual/Documentary"); - caps.Categories.AddCategoryMapping("132", NewznabStandardCategory.AudioAudiobook, "Radio - Reading"); - - return caps; - } } public class MyAnonamouseRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs index 7613c74f6..bfff2c57c 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs @@ -14,6 +14,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -24,17 +25,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class Nebulance : TorrentIndexerBase { public override string Name => "Nebulance"; - public override string[] IndexerUrls => new string[] { "https://nebulance.io/" }; private string LoginUrl => Settings.BaseUrl + "login.php"; - public override string Description => "Nebulance (NBL) is a ratioless Private Torrent Tracker for TV"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public Nebulance(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Nebulance(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -87,23 +82,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TV); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVSD); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TVHD); - - return caps; - } } public class NebulanceRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/Newznab/Newznab.cs b/src/NzbDrone.Core/Indexers/Definitions/Newznab/Newznab.cs index 9660c9391..514c4d108 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Newznab/Newznab.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Newznab/Newznab.cs @@ -8,6 +8,7 @@ using NzbDrone.Common.Extensions; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.ThingiProvider; using NzbDrone.Core.Validation; @@ -89,35 +90,12 @@ namespace NzbDrone.Core.Indexers.Newznab { get { - yield return GetDefinition("abNZB", GetSettings("https://abnzb.com")); - yield return GetDefinition("altHUB", GetSettings("https://api.althub.co.za")); - yield return GetDefinition("AnimeTosho (Usenet)", GetSettings("https://feed.animetosho.org")); - yield return GetDefinition("DOGnzb", GetSettings("https://api.dognzb.cr")); - yield return GetDefinition("DrunkenSlug", GetSettings("https://drunkenslug.com")); - yield return GetDefinition("GingaDADDY", GetSettings("https://www.gingadaddy.com")); - yield return GetDefinition("Miatrix", GetSettings("https://www.miatrix.com")); - yield return GetDefinition("Newz-Complex", GetSettings("https://newz-complex.org/www")); - yield return GetDefinition("Newz69", GetSettings("https://newz69.keagaming.com")); - yield return GetDefinition("NinjaCentral", GetSettings("https://ninjacentral.co.za")); - yield return GetDefinition("Nzb.su", GetSettings("https://api.nzb.su")); - yield return GetDefinition("NZBCat", GetSettings("https://nzb.cat")); - yield return GetDefinition("NZBFinder", GetSettings("https://nzbfinder.ws")); - yield return GetDefinition("NZBgeek", GetSettings("https://api.nzbgeek.info")); - yield return GetDefinition("NzbNoob", GetSettings("https://www.nzbnoob.com")); - yield return GetDefinition("NZBNDX", GetSettings("https://www.nzbndx.com")); - yield return GetDefinition("NzbPlanet", GetSettings("https://api.nzbplanet.net")); - yield return GetDefinition("NZBStars", GetSettings("https://nzbstars.com")); - yield return GetDefinition("OZnzb", GetSettings("https://api.oznzb.com")); - yield return GetDefinition("SimplyNZBs", GetSettings("https://simplynzbs.com")); - yield return GetDefinition("SpotNZB", GetSettings("https://spotnzb.xyz")); - yield return GetDefinition("Tabula Rasa", GetSettings("https://www.tabula-rasa.pw", apiPath: @"/api/v1/api")); - yield return GetDefinition("Usenet Crawler", GetSettings("https://www.usenet-crawler.com")); yield return GetDefinition("Generic Newznab", GetSettings("")); } } - public Newznab(INewznabCapabilitiesProvider capabilitiesProvider, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, nzbValidationService, logger) + public Newznab(INewznabCapabilitiesProvider capabilitiesProvider, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, nzbValidationService, logger) { _capabilitiesProvider = capabilitiesProvider; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/NorBits.cs b/src/NzbDrone.Core/Indexers/Definitions/NorBits.cs index d80e3b032..6590bcd98 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/NorBits.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/NorBits.cs @@ -18,6 +18,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -29,16 +30,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class NorBits : TorrentIndexerBase { public override string Name => "NorBits"; - public override string[] IndexerUrls => new string[] { "https://norbits.net/" }; - public override string Description => "NorBits is a Norwegian Private site for MOVIES / TV / GENERAL"; - public override string Language => "nb-NO"; - public override Encoding Encoding => Encoding.GetEncoding("iso-8859-1"); public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public NorBits(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public NorBits(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -119,53 +114,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("main_cat[]=1&sub2_cat[]=49", NewznabStandardCategory.MoviesUHD, "Filmer - UHD-2160p"); - caps.Categories.AddCategoryMapping("main_cat[]=1&sub2_cat[]=19", NewznabStandardCategory.MoviesHD, "Filmer - HD-1080p/i"); - caps.Categories.AddCategoryMapping("main_cat[]=1&sub2_cat[]=20", NewznabStandardCategory.MoviesHD, "Filmer - HD-720p"); - caps.Categories.AddCategoryMapping("main_cat[]=1&sub2_cat[]=22", NewznabStandardCategory.MoviesSD, "Filmer - SD"); - caps.Categories.AddCategoryMapping("main_cat[]=2&sub2_cat[]=49", NewznabStandardCategory.TVUHD, "TV - UHD-2160p"); - caps.Categories.AddCategoryMapping("main_cat[]=2&sub2_cat[]=19", NewznabStandardCategory.TVHD, "TV - HD-1080p/i"); - caps.Categories.AddCategoryMapping("main_cat[]=2&sub2_cat[]=20", NewznabStandardCategory.TVHD, "TV - HD-720p"); - caps.Categories.AddCategoryMapping("main_cat[]=2&sub2_cat[]=22", NewznabStandardCategory.TVSD, "TV - SD"); - caps.Categories.AddCategoryMapping("main_cat[]=3", NewznabStandardCategory.PC, "Programmer"); - caps.Categories.AddCategoryMapping("main_cat[]=4", NewznabStandardCategory.Console, "Spill"); - caps.Categories.AddCategoryMapping("main_cat[]=5&sub2_cat[]=42", NewznabStandardCategory.AudioMP3, "Musikk - 192"); - caps.Categories.AddCategoryMapping("main_cat[]=5&sub2_cat[]=43", NewznabStandardCategory.AudioMP3, "Musikk - 256"); - caps.Categories.AddCategoryMapping("main_cat[]=5&sub2_cat[]=44", NewznabStandardCategory.AudioMP3, "Musikk - 320"); - caps.Categories.AddCategoryMapping("main_cat[]=5&sub2_cat[]=45", NewznabStandardCategory.AudioMP3, "Musikk - VBR"); - caps.Categories.AddCategoryMapping("main_cat[]=5&sub2_cat[]=46", NewznabStandardCategory.AudioLossless, "Musikk - Lossless"); - caps.Categories.AddCategoryMapping("main_cat[]=6", NewznabStandardCategory.Books, "Tidsskrift"); - caps.Categories.AddCategoryMapping("main_cat[]=7", NewznabStandardCategory.AudioAudiobook, "Lydbøker"); - caps.Categories.AddCategoryMapping("main_cat[]=8&sub2_cat[]=19", NewznabStandardCategory.AudioVideo, "Musikkvideoer - HD-1080p/i"); - caps.Categories.AddCategoryMapping("main_cat[]=8&sub2_cat[]=20", NewznabStandardCategory.AudioVideo, "Musikkvideoer - HD-720p"); - caps.Categories.AddCategoryMapping("main_cat[]=8&sub2_cat[]=22", NewznabStandardCategory.AudioVideo, "Musikkvideoer - SD"); - caps.Categories.AddCategoryMapping("main_cat[]=40", NewznabStandardCategory.AudioOther, "Podcasts"); - - return caps; - } } public class NorBitsRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/NotWhatCD.cs b/src/NzbDrone.Core/Indexers/Definitions/NotWhatCD.cs index 36b0ff1f0..10f37ea3d 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/NotWhatCD.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/NotWhatCD.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions @@ -9,46 +10,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class NotWhatCD : Gazelle.Gazelle { public override string Name => "notwhat.cd"; - public override string[] IndexerUrls => new string[] { "https://notwhat.cd/" }; - public override string Description => "NotWhat.CD (NWCD) is a private Music tracker that arised after the former (WCD) shut down."; public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public NotWhatCD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public NotWhatCD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q, MusicSearchParam.Album, MusicSearchParam.Artist, MusicSearchParam.Label, MusicSearchParam.Year - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PC, "Applications"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Books, "E-Books"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.AudioAudiobook, "Audiobooks"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Movies, "E-Learning Videos"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.TV, "Comedy"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.Books, "Comics"); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/Orpheus.cs b/src/NzbDrone.Core/Indexers/Definitions/Orpheus.cs index cd7286542..a9662bde6 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Orpheus.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Orpheus.cs @@ -3,6 +3,7 @@ using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Gazelle; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions @@ -10,40 +11,12 @@ namespace NzbDrone.Core.Indexers.Definitions public class Orpheus : Gazelle.Gazelle { public override string Name => "Orpheus"; - public override string[] IndexerUrls => new string[] { "https://orpheus.network/" }; - public override string Description => "Orpheus (APOLLO) is a Private Torrent Tracker for MUSIC"; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public Orpheus(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Orpheus(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - MusicSearchParams = new List - { - MusicSearchParam.Q, MusicSearchParam.Album, MusicSearchParam.Artist, MusicSearchParam.Label, MusicSearchParam.Year - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PC, "Applications"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Books, "E-Books"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.AudioAudiobook, "Audiobooks"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Other, "E-Learning Videos"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.Other, "Comedy"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.Books, "Comics"); - - return caps; - } - public override IParseIndexerResponse GetParser() { return new OrpheusParser(Settings, Capabilities); diff --git a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs index 79f9f458a..46bff930b 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PassThePopcorn/PassThePopcorn.cs @@ -3,6 +3,7 @@ using NLog; using NzbDrone.Common.Cache; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.PassThePopcorn @@ -10,24 +11,20 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn public class PassThePopcorn : TorrentIndexerBase { public override string Name => "PassThePopcorn"; - public override string[] IndexerUrls => new string[] { "https://passthepopcorn.me" }; - public override string Description => "PassThePopcorn (PTP) is a Private site for MOVIES / TV"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; public override bool SupportsRss => true; public override bool SupportsSearch => true; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public override int PageSize => 50; public PassThePopcorn(IIndexerHttpClient httpClient, - IEventAggregator eventAggregator, - ICacheManager cacheManager, - IIndexerStatusService indexerStatusService, - IConfigService configService, - Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + IEventAggregator eventAggregator, + ICacheManager cacheManager, + IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, + IConfigService configService, + Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -41,43 +38,6 @@ namespace NzbDrone.Core.Indexers.PassThePopcorn }; } - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - SearchParams = new List - { - SearchParam.Q - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - Flags = new List - { - IndexerFlag.FreeLeech, - PassThePopcornFlag.Golden, - PassThePopcornFlag.Approved - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies, "Feature Film"); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesForeign); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesOther); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesSD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesHD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies3D); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesBluRay); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesDVD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesWEBDL); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.Movies, "Short Film"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TV, "Miniseries"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TV, "Stand-up Comedy"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TV, "Live Performance"); - - return caps; - } - public override IParseIndexerResponse GetParser() { return new PassThePopcornParser(Settings, Capabilities, _logger); diff --git a/src/NzbDrone.Core/Indexers/Definitions/PornoLab.cs b/src/NzbDrone.Core/Indexers/Definitions/PornoLab.cs index 8293a42c0..8291ac036 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PornoLab.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PornoLab.cs @@ -14,6 +14,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -24,17 +25,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class PornoLab : TorrentIndexerBase { public override string Name => "PornoLab"; - public override string[] IndexerUrls => new string[] { "https://pornolab.net/" }; private string LoginUrl => Settings.BaseUrl + "forum/login.php"; - public override string Description => "PornoLab is a Semi-Private Russian site for Adult content"; - public override string Language => "ru-RU"; - public override Encoding Encoding => Encoding.GetEncoding("windows-1251"); public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.SemiPrivate; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public PornoLab(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public PornoLab(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -94,151 +89,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - }; - - caps.Categories.AddCategoryMapping(1768, NewznabStandardCategory.XXX, "Эротические фильмы / Erotic Movies"); - caps.Categories.AddCategoryMapping(60, NewznabStandardCategory.XXX, "Документальные фильмы / Documentary & Reality"); - caps.Categories.AddCategoryMapping(1644, NewznabStandardCategory.XXX, "Нудизм-Натуризм / Nudity"); - - caps.Categories.AddCategoryMapping(1111, NewznabStandardCategory.XXXPack, "Паки полных фильмов / Full Length Movies Packs"); - caps.Categories.AddCategoryMapping(508, NewznabStandardCategory.XXX, "Классические фильмы / Classic"); - caps.Categories.AddCategoryMapping(555, NewznabStandardCategory.XXX, "Фильмы с сюжетом / Feature & Vignettes"); - caps.Categories.AddCategoryMapping(1673, NewznabStandardCategory.XXX, "Гонзо-фильмы 2011-2021 / Gonzo 2011-2021"); - caps.Categories.AddCategoryMapping(1112, NewznabStandardCategory.XXX, "Фильмы без сюжета 1991-2010 / All Sex & Amateur 1991-2010"); - caps.Categories.AddCategoryMapping(1718, NewznabStandardCategory.XXX, "Фильмы без сюжета 2011-2021 / All Sex & Amateur 2011-2021"); - caps.Categories.AddCategoryMapping(553, NewznabStandardCategory.XXX, "Лесбо-фильмы / All Girl & Solo"); - caps.Categories.AddCategoryMapping(1143, NewznabStandardCategory.XXX, "Этнические фильмы / Ethnic-Themed"); - caps.Categories.AddCategoryMapping(1646, NewznabStandardCategory.XXX, "Видео для телефонов и КПК / Pocket РС & Phone Video"); - - caps.Categories.AddCategoryMapping(1712, NewznabStandardCategory.XXX, "Эротические и Документальные фильмы (DVD и HD) / EroticDocumentary & Reality (DVD & HD)"); - caps.Categories.AddCategoryMapping(1713, NewznabStandardCategory.XXXDVD, "Фильмы с сюжетомКлассические (DVD) / Feature & Vignettes, Classic (DVD)"); - caps.Categories.AddCategoryMapping(512, NewznabStandardCategory.XXXDVD, "ГонзоЛесбо и Фильмы без сюжета (DVD) / Gonzo, All Girl & Solo, All Sex (DVD)"); - caps.Categories.AddCategoryMapping(1775, NewznabStandardCategory.XXX, "Фильмы с сюжетом (HD Video) / Feature & Vignettes (HD Video)"); - caps.Categories.AddCategoryMapping(1450, NewznabStandardCategory.XXX, "ГонзоЛесбо и Фильмы без сюжета (HD Video) / Gonzo, All Girl & Solo, All Sex (HD Video)"); - - caps.Categories.AddCategoryMapping(902, NewznabStandardCategory.XXX, "Русские порнофильмы / Russian Full Length Movies"); - caps.Categories.AddCategoryMapping(1675, NewznabStandardCategory.XXXPack, "Паки русских порнороликов / Russian Clips Packs"); - caps.Categories.AddCategoryMapping(36, NewznabStandardCategory.XXX, "Сайтрипы с русскими актрисами 1991-2015 / Russian SiteRip's 1991-2015"); - caps.Categories.AddCategoryMapping(1830, NewznabStandardCategory.XXX, "Сайтрипы с русскими актрисами 1991-2015 (HD Video) / Russian SiteRip's 1991-2015 (HD Video)"); - caps.Categories.AddCategoryMapping(1803, NewznabStandardCategory.XXX, "Сайтрипы с русскими актрисами 2016-2021 / Russian SiteRip's 2016-2021"); - caps.Categories.AddCategoryMapping(1831, NewznabStandardCategory.XXX, "Сайтрипы с русскими актрисами 2016-2021 (HD Video) / Russian SiteRip's 2016-2021 (HD Video)"); - caps.Categories.AddCategoryMapping(1741, NewznabStandardCategory.XXX, "Русские Порноролики Разное / Russian Clips (various)"); - caps.Categories.AddCategoryMapping(1676, NewznabStandardCategory.XXX, "Русское любительское видео / Russian Amateur Video"); - - caps.Categories.AddCategoryMapping(1780, NewznabStandardCategory.XXXPack, "Паки сайтрипов (HD Video) / SiteRip's Packs (HD Video)"); - caps.Categories.AddCategoryMapping(1110, NewznabStandardCategory.XXXPack, "Паки сайтрипов / SiteRip's Packs"); - caps.Categories.AddCategoryMapping(1678, NewznabStandardCategory.XXXPack, "Паки порнороликов по актрисам / Actresses Clips Packs"); - caps.Categories.AddCategoryMapping(1124, NewznabStandardCategory.XXX, "Сайтрипы 1991-2010 (HD Video) / SiteRip's 1991-2010 (HD Video)"); - caps.Categories.AddCategoryMapping(1784, NewznabStandardCategory.XXX, "Сайтрипы 2011-2012 (HD Video) / SiteRip's 2011-2012 (HD Video)"); - caps.Categories.AddCategoryMapping(1769, NewznabStandardCategory.XXX, "Сайтрипы 2013 (HD Video) / SiteRip's 2013 (HD Video)"); - caps.Categories.AddCategoryMapping(1793, NewznabStandardCategory.XXX, "Сайтрипы 2014 (HD Video) / SiteRip's 2014 (HD Video)"); - caps.Categories.AddCategoryMapping(1797, NewznabStandardCategory.XXX, "Сайтрипы 2015 (HD Video) / SiteRip's 2015 (HD Video)"); - caps.Categories.AddCategoryMapping(1804, NewznabStandardCategory.XXX, "Сайтрипы 2016 (HD Video) / SiteRip's 2016 (HD Video)"); - caps.Categories.AddCategoryMapping(1819, NewznabStandardCategory.XXX, "Сайтрипы 2017 (HD Video) / SiteRip's 2017 (HD Video)"); - caps.Categories.AddCategoryMapping(1825, NewznabStandardCategory.XXX, "Сайтрипы 2018 (HD Video) / SiteRip's 2018 (HD Video)"); - caps.Categories.AddCategoryMapping(1836, NewznabStandardCategory.XXX, "Сайтрипы 2019 (HD Video) / SiteRip's 2019 (HD Video)"); - caps.Categories.AddCategoryMapping(1842, NewznabStandardCategory.XXX, "Сайтрипы 2020 (HD Video) / SiteRip's 2020 (HD Video)"); - caps.Categories.AddCategoryMapping(1846, NewznabStandardCategory.XXX, "Сайтрипы 2021 (HD Video) / SiteRip's 2021 (HD Video)"); - caps.Categories.AddCategoryMapping(1857, NewznabStandardCategory.XXX, "Сайтрипы 2022 (HD Video) / SiteRip's 2022 (HD Video)"); - - caps.Categories.AddCategoryMapping(1451, NewznabStandardCategory.XXX, "Сайтрипы 1991-2010 / SiteRip's 1991-2010"); - caps.Categories.AddCategoryMapping(1788, NewznabStandardCategory.XXX, "Сайтрипы 2011-2012 / SiteRip's 2011-2012"); - caps.Categories.AddCategoryMapping(1789, NewznabStandardCategory.XXX, "Сайтрипы 2013 / SiteRip's 2013"); - caps.Categories.AddCategoryMapping(1792, NewznabStandardCategory.XXX, "Сайтрипы 2014 / SiteRip's 2014"); - caps.Categories.AddCategoryMapping(1798, NewznabStandardCategory.XXX, "Сайтрипы 2015 / SiteRip's 2015"); - caps.Categories.AddCategoryMapping(1805, NewznabStandardCategory.XXX, "Сайтрипы 2016 / SiteRip's 2016"); - caps.Categories.AddCategoryMapping(1820, NewznabStandardCategory.XXX, "Сайтрипы 2017 / SiteRip's 2017"); - caps.Categories.AddCategoryMapping(1826, NewznabStandardCategory.XXX, "Сайтрипы 2018 / SiteRip's 2018"); - caps.Categories.AddCategoryMapping(1837, NewznabStandardCategory.XXX, "Сайтрипы 2019 / SiteRip's 2019"); - caps.Categories.AddCategoryMapping(1843, NewznabStandardCategory.XXX, "Сайтрипы 2020 / SiteRip's 2020"); - caps.Categories.AddCategoryMapping(1847, NewznabStandardCategory.XXX, "Сайтрипы 2021 / SiteRip's 2021"); - caps.Categories.AddCategoryMapping(1856, NewznabStandardCategory.XXX, "Сайтрипы 2022 / SiteRip's 2022"); - - caps.Categories.AddCategoryMapping(1707, NewznabStandardCategory.XXX, "Сцены из фильмов / Movie Scenes"); - caps.Categories.AddCategoryMapping(284, NewznabStandardCategory.XXX, "Порноролики Разное / Clips (various)"); - caps.Categories.AddCategoryMapping(1823, NewznabStandardCategory.XXX, "Порноролики в 3D и Virtual Reality (VR) / 3D & Virtual Reality Videos"); - - caps.Categories.AddCategoryMapping(1801, NewznabStandardCategory.XXXPack, "Паки японских фильмов и сайтрипов / Full Length Japanese Movies Packs & SiteRip's Packs"); - caps.Categories.AddCategoryMapping(1719, NewznabStandardCategory.XXX, "Японские фильмы и сайтрипы (DVD и HD Video) / Japanese Movies & SiteRip's (DVD & HD Video)"); - caps.Categories.AddCategoryMapping(997, NewznabStandardCategory.XXX, "Японские фильмы и сайтрипы 1991-2014 / Japanese Movies & SiteRip's 1991-2014"); - caps.Categories.AddCategoryMapping(1818, NewznabStandardCategory.XXX, "Японские фильмы и сайтрипы 2015-2019 / Japanese Movies & SiteRip's 2015-2019"); - - caps.Categories.AddCategoryMapping(1671, NewznabStandardCategory.XXX, "Эротические студии (видео) / Erotic Video Library"); - caps.Categories.AddCategoryMapping(1726, NewznabStandardCategory.XXX, "Met-Art & MetModels"); - caps.Categories.AddCategoryMapping(883, NewznabStandardCategory.XXXImageSet, "Эротические студии Разное / Erotic Picture Gallery (various)"); - caps.Categories.AddCategoryMapping(1759, NewznabStandardCategory.XXXImageSet, "Паки сайтрипов эротических студий / Erotic Picture SiteRip's Packs"); - caps.Categories.AddCategoryMapping(1728, NewznabStandardCategory.XXXImageSet, "Любительское фото / Amateur Picture Gallery"); - caps.Categories.AddCategoryMapping(1729, NewznabStandardCategory.XXXPack, "Подборки по актрисам / Actresses Picture Packs"); - caps.Categories.AddCategoryMapping(38, NewznabStandardCategory.XXXImageSet, "Подборки сайтрипов / SiteRip's Picture Packs"); - caps.Categories.AddCategoryMapping(1757, NewznabStandardCategory.XXXImageSet, "Подборки сетов / Picture Sets Packs"); - caps.Categories.AddCategoryMapping(1735, NewznabStandardCategory.XXXImageSet, "Тематическое и нетрадиционное фото / Misc & Special Interest Picture Packs"); - caps.Categories.AddCategoryMapping(1731, NewznabStandardCategory.XXXImageSet, "Журналы / Magazines"); - - caps.Categories.AddCategoryMapping(1679, NewznabStandardCategory.XXX, "Хентай: основной подраздел / Hentai: main subsection"); - caps.Categories.AddCategoryMapping(1740, NewznabStandardCategory.XXX, "Хентай в высоком качестве (DVD и HD) / Hentai DVD & HD"); - caps.Categories.AddCategoryMapping(1834, NewznabStandardCategory.XXX, "Хентай: ролики 2D / Hentai: 2D video"); - caps.Categories.AddCategoryMapping(1752, NewznabStandardCategory.XXX, "Хентай: ролики 3D / Hentai: 3D video"); - caps.Categories.AddCategoryMapping(1760, NewznabStandardCategory.XXX, "Хентай: Манга / Hentai: Manga"); - caps.Categories.AddCategoryMapping(1781, NewznabStandardCategory.XXX, "Хентай: Арт и HCG / Hentai: Artwork & HCG"); - caps.Categories.AddCategoryMapping(1711, NewznabStandardCategory.XXX, "Мультфильмы / Cartoons"); - caps.Categories.AddCategoryMapping(1296, NewznabStandardCategory.XXX, "Комиксы и рисунки / Comics & Artwork"); - - caps.Categories.AddCategoryMapping(1750, NewznabStandardCategory.XXX, "Игры: основной подраздел / Games: main subsection"); - caps.Categories.AddCategoryMapping(1756, NewznabStandardCategory.XXX, "Игры: визуальные новеллы / Games: Visual Novels"); - caps.Categories.AddCategoryMapping(1785, NewznabStandardCategory.XXX, "Игры: ролевые / Games: role-playing (RPG Maker and WOLF RPG Editor)"); - caps.Categories.AddCategoryMapping(1790, NewznabStandardCategory.XXX, "Игры и Софт: Анимация / Software: Animation"); - caps.Categories.AddCategoryMapping(1827, NewznabStandardCategory.XXX, "Игры: В разработке и Демо (основной подраздел) / Games: In Progress and Demo (main subsection)"); - caps.Categories.AddCategoryMapping(1828, NewznabStandardCategory.XXX, "Игры: В разработке и Демо (ролевые) / Games: In Progress and Demo (role-playing - RPG Maker and WOLF RPG Editor)"); - - caps.Categories.AddCategoryMapping(1715, NewznabStandardCategory.XXX, "Транссексуалы (DVD и HD) / Transsexual (DVD & HD)"); - caps.Categories.AddCategoryMapping(1680, NewznabStandardCategory.XXX, "Транссексуалы / Transsexual"); - - caps.Categories.AddCategoryMapping(1758, NewznabStandardCategory.XXX, "Бисексуалы / Bisexual"); - caps.Categories.AddCategoryMapping(1682, NewznabStandardCategory.XXX, "БДСМ / BDSM"); - caps.Categories.AddCategoryMapping(1733, NewznabStandardCategory.XXX, "Женское доминирование и страпон / Femdom & Strapon"); - caps.Categories.AddCategoryMapping(1754, NewznabStandardCategory.XXX, "Подглядывание / Voyeur"); - caps.Categories.AddCategoryMapping(1734, NewznabStandardCategory.XXX, "Фистинг и дилдо / Fisting & Dildo"); - caps.Categories.AddCategoryMapping(1791, NewznabStandardCategory.XXX, "Беременные / Pregnant"); - caps.Categories.AddCategoryMapping(509, NewznabStandardCategory.XXX, "Буккаке / Bukkake"); - caps.Categories.AddCategoryMapping(1685, NewznabStandardCategory.XXX, "Мочеиспускание / Peeing"); - caps.Categories.AddCategoryMapping(1762, NewznabStandardCategory.XXX, "Фетиш / Fetish"); - - caps.Categories.AddCategoryMapping(903, NewznabStandardCategory.XXX, "Полнометражные гей-фильмы / Full Length Movies (Gay)"); - caps.Categories.AddCategoryMapping(1765, NewznabStandardCategory.XXX, "Полнометражные азиатские гей-фильмы / Full-length Asian Films (Gay)"); - caps.Categories.AddCategoryMapping(1767, NewznabStandardCategory.XXX, "Классические гей-фильмы (до 1990 года) / Classic Gay Films (Pre-1990's)"); - caps.Categories.AddCategoryMapping(1755, NewznabStandardCategory.XXX, "Гей-фильмы в высоком качестве (DVD и HD) / High-Quality Full Length Movies (Gay DVD & HD)"); - caps.Categories.AddCategoryMapping(1787, NewznabStandardCategory.XXX, "Азиатские гей-фильмы в высоком качестве (DVD и HD) / High-Quality Full Length Asian Movies (Gay DVD & HD)"); - caps.Categories.AddCategoryMapping(1763, NewznabStandardCategory.XXXPack, "ПАКи гей-роликов и сайтрипов / Clip's & SiteRip's Packs (Gay)"); - caps.Categories.AddCategoryMapping(1777, NewznabStandardCategory.XXX, "Гей-ролики в высоком качестве (HD Video) / Gay Clips (HD Video)"); - caps.Categories.AddCategoryMapping(1691, NewznabStandardCategory.XXX, "РоликиSiteRip'ы и сцены из гей-фильмов / Clips & Movie Scenes (Gay)"); - caps.Categories.AddCategoryMapping(1692, NewznabStandardCategory.XXXImageSet, "Гей-журналыфото, разное / Magazines, Photo, Rest (Gay)"); - - caps.Categories.AddCategoryMapping(1817, NewznabStandardCategory.XXX, "Обход блокировки"); - caps.Categories.AddCategoryMapping(1670, NewznabStandardCategory.XXX, "Эротическое видео / Erotic&Softcore"); - caps.Categories.AddCategoryMapping(1672, NewznabStandardCategory.XXX, "Зарубежные порнофильмы / Full Length Movies"); - caps.Categories.AddCategoryMapping(1717, NewznabStandardCategory.XXX, "Зарубежные фильмы в высоком качестве (DVD&HD) / Full Length .."); - caps.Categories.AddCategoryMapping(1674, NewznabStandardCategory.XXX, "Русское порно / Russian Video"); - caps.Categories.AddCategoryMapping(1677, NewznabStandardCategory.XXX, "Зарубежные порноролики / Clips"); - caps.Categories.AddCategoryMapping(1800, NewznabStandardCategory.XXX, "Японское порно / Japanese Adult Video (JAV)"); - caps.Categories.AddCategoryMapping(1815, NewznabStandardCategory.XXX, "Архив (Японское порно)"); - caps.Categories.AddCategoryMapping(1723, NewznabStandardCategory.XXX, "Эротические студиифото и журналы / Erotic Picture Gallery .."); - caps.Categories.AddCategoryMapping(1802, NewznabStandardCategory.XXX, "Архив (Фото)"); - caps.Categories.AddCategoryMapping(1745, NewznabStandardCategory.XXX, "Хентай и МангаМультфильмы и Комиксы, Рисунки / Hentai&Ma.."); - caps.Categories.AddCategoryMapping(1838, NewznabStandardCategory.XXX, "Игры / Games"); - caps.Categories.AddCategoryMapping(1829, NewznabStandardCategory.XXX, "Обсуждение игр / Games Discussion"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.XXX, "Нетрадиционное порно / Special Interest Movies&Clips"); - caps.Categories.AddCategoryMapping(1681, NewznabStandardCategory.XXX, "Дефекация / Scat"); - caps.Categories.AddCategoryMapping(1683, NewznabStandardCategory.XXX, "Архив (общий)"); - caps.Categories.AddCategoryMapping(1688, NewznabStandardCategory.XXX, "Гей-порно / Gay Forum"); - caps.Categories.AddCategoryMapping(1720, NewznabStandardCategory.XXX, "Архив (Гей-порно)"); - - return caps; - } } public class PornoLabRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/PreToMe.cs b/src/NzbDrone.Core/Indexers/Definitions/PreToMe.cs index 8e9198486..9b4842e4d 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/PreToMe.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/PreToMe.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -25,17 +26,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class PreToMe : TorrentIndexerBase { public override string Name => "PreToMe"; - public override string[] IndexerUrls => new string[] { "https://pretome.info/" }; - public override string Description => "PreToMe is a ratioless 0Day/General tracker."; private string LoginUrl => Settings.BaseUrl + "takelogin.php"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.GetEncoding("iso-8859-1"); public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public PreToMe(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public PreToMe(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -96,90 +91,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("cat[]=22", NewznabStandardCategory.PC, "Applications"); - caps.Categories.AddCategoryMapping("cat[]=22&tags=Windows", NewznabStandardCategory.PC0day, "Applications/Windows"); - caps.Categories.AddCategoryMapping("cat[]=22&tags=MAC", NewznabStandardCategory.PCMac, "Applications/MAC"); - caps.Categories.AddCategoryMapping("cat[]=22&tags=Linux", NewznabStandardCategory.PC, "Applications/Linux"); - - caps.Categories.AddCategoryMapping("cat[]=27", NewznabStandardCategory.BooksEBook, "Ebooks"); - - caps.Categories.AddCategoryMapping("cat[]=4", NewznabStandardCategory.Console, "Games"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=PC", NewznabStandardCategory.PCGames, "Games/PC"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=RIP", NewznabStandardCategory.PCGames, "Games/RIP"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=ISO", NewznabStandardCategory.PCGames, "Games/ISO"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=XBOX360", NewznabStandardCategory.ConsoleXBox360, "Games/XBOX360"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=PS3", NewznabStandardCategory.ConsolePS3, "Games/PS3"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=Wii", NewznabStandardCategory.ConsoleWii, "Games/Wii"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=PSP", NewznabStandardCategory.ConsolePSP, "Games/PSP"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=GAMES-NSW", NewznabStandardCategory.ConsoleOther, "Games/NSW"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=NDS", NewznabStandardCategory.ConsoleNDS, "Games/NDS"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=Xbox", NewznabStandardCategory.ConsoleXBox, "Games/Xbox"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=NSW", NewznabStandardCategory.ConsoleOther, "Games/NSW"); - caps.Categories.AddCategoryMapping("cat[]=4&tags=PS2", NewznabStandardCategory.ConsoleOther, "Games/PS2"); - - caps.Categories.AddCategoryMapping("cat[]=31", NewznabStandardCategory.Other, "Miscellaneous"); - caps.Categories.AddCategoryMapping("cat[]=31&tags=Ebook", NewznabStandardCategory.BooksEBook, "Miscellaneous/Ebook"); - caps.Categories.AddCategoryMapping("cat[]=31&tags=RARFiX", NewznabStandardCategory.Other, "Miscellaneous/RARFiX"); - - caps.Categories.AddCategoryMapping("cat[]=19", NewznabStandardCategory.Movies, "Movies"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=x264", NewznabStandardCategory.Movies, "Movies/x264"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=720p", NewznabStandardCategory.MoviesHD, "Movies/720p"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=XviD", NewznabStandardCategory.MoviesSD, "Movies/XviD"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=BluRay", NewznabStandardCategory.MoviesHD, "Movies/BluRay"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=DVDRiP", NewznabStandardCategory.MoviesSD, "Movies/DVDRiP"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=1080p", NewznabStandardCategory.MoviesHD, "Movies/1080p"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=DVD", NewznabStandardCategory.MoviesSD, "Movies/DVD"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=DVDR", NewznabStandardCategory.MoviesSD, "Movies/DVDR"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=WMV", NewznabStandardCategory.Movies, "Movies/WMV"); - caps.Categories.AddCategoryMapping("cat[]=19&tags=CAM", NewznabStandardCategory.Movies, "Movies/CAM"); - - caps.Categories.AddCategoryMapping("cat[]=6", NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping("cat[]=6&tags=MP3", NewznabStandardCategory.AudioMP3, "Music/MP3"); - caps.Categories.AddCategoryMapping("cat[]=6&tags=V2", NewznabStandardCategory.AudioMP3, "Music/V2"); - caps.Categories.AddCategoryMapping("cat[]=6&tags=FLAC", NewznabStandardCategory.AudioLossless, "Music/FLAC"); - caps.Categories.AddCategoryMapping("cat[]=6&tags=320kbps", NewznabStandardCategory.AudioMP3, "Music/320kbps"); - - caps.Categories.AddCategoryMapping("cat[]=7", NewznabStandardCategory.TV, "TV"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=x264", NewznabStandardCategory.TVHD, "TV/x264"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=720p", NewznabStandardCategory.TVHD, "TV/720p"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=HDTV", NewznabStandardCategory.TVHD, "TV/HDTV"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=XviD", NewznabStandardCategory.TVSD, "TV/XviD"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=BluRay", NewznabStandardCategory.TVHD, "TV/BluRay"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=DVDRiP", NewznabStandardCategory.TVSD, "TV/DVDRiP"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=DVD", NewznabStandardCategory.TVSD, "TV/DVD"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=Documentary", NewznabStandardCategory.TVDocumentary, "TV/Documentary"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=PDTV", NewznabStandardCategory.TVSD, "TV/PDTV"); - caps.Categories.AddCategoryMapping("cat[]=7&tags=HD-DVD", NewznabStandardCategory.TVSD, "TV/HD-DVD"); - - caps.Categories.AddCategoryMapping("cat[]=51", NewznabStandardCategory.XXX, "XXX"); - caps.Categories.AddCategoryMapping("cat[]=51&tags=XviD", NewznabStandardCategory.XXXXviD, "XXX/XviD"); - caps.Categories.AddCategoryMapping("cat[]=51&tags=DVDRiP", NewznabStandardCategory.XXXDVD, "XXX/DVDRiP"); - - return caps; - } } public class PreToMeRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/PrivateHD.cs b/src/NzbDrone.Core/Indexers/Definitions/PrivateHD.cs deleted file mode 100644 index b8fd39c10..000000000 --- a/src/NzbDrone.Core/Indexers/Definitions/PrivateHD.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.Collections.Generic; -using NLog; -using NzbDrone.Core.Configuration; -using NzbDrone.Core.Indexers.Definitions.Avistaz; -using NzbDrone.Core.Messaging.Events; - -namespace NzbDrone.Core.Indexers.Definitions -{ - public class PrivateHD : Avistaz.AvistazBase - { - public override string Name => "PrivateHD"; - public override string[] IndexerUrls => new string[] { "https://privatehd.to/" }; - public override string Description => "PrivateHD is a Private Torrent Tracker for HD MOVIES / TV and the sister-site of AvistaZ, CinemaZ, ExoticaZ, and AnimeTorrents"; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - - public PrivateHD(IIndexerRepository indexerRepository, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(indexerRepository, httpClient, eventAggregator, indexerStatusService, configService, logger) - { - } - - public override IIndexerRequestGenerator GetRequestGenerator() - { - return new AvistazRequestGenerator() - { - Settings = Settings, - HttpClient = _httpClient, - Logger = _logger, - Capabilities = Capabilities - }; - } - - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId, TvSearchParam.TvdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId, MovieSearchParam.TmdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesUHD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesHD); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesSD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVUHD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVHD); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVSD); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Audio); - - return caps; - } - } -} diff --git a/src/NzbDrone.Core/Indexers/Definitions/Rarbg/Rarbg.cs b/src/NzbDrone.Core/Indexers/Definitions/Rarbg/Rarbg.cs index 4fc04fbf4..a48f30cbd 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Rarbg/Rarbg.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Rarbg/Rarbg.cs @@ -8,6 +8,7 @@ using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Exceptions; using NzbDrone.Core.Http.CloudFlare; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Validation; @@ -18,19 +19,13 @@ namespace NzbDrone.Core.Indexers.Rarbg private readonly IRarbgTokenProvider _tokenProvider; public override string Name => "Rarbg"; - public override string[] IndexerUrls => new string[] { "https://torrentapi.org" }; - public override string Description => "RARBG is a Public torrent site for MOVIES / TV / GENERAL"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Public; - - public override IndexerCapabilities Capabilities => SetCapabilities(); - public override TimeSpan RateLimit => TimeSpan.FromSeconds(2); - public Rarbg(IRarbgTokenProvider tokenProvider, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Rarbg(IRarbgTokenProvider tokenProvider, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { _tokenProvider = tokenProvider; } @@ -45,56 +40,6 @@ namespace NzbDrone.Core.Indexers.Rarbg return new RarbgParser(Capabilities); } - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId, TvSearchParam.TvdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId, MovieSearchParam.TmdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.XXX, "XXX (18+)"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.MoviesSD, "Movies/XVID"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.MoviesSD, "Movies/x264"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.TVSD, "TV Episodes"); - caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.AudioMP3, "Music/MP3"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.AudioLossless, "Music/FLAC"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.PCGames, "Games/PC ISO"); - caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.PCGames, "Games/PC RIP"); - caps.Categories.AddCategoryMapping(32, NewznabStandardCategory.ConsoleXBox360, "Games/XBOX-360"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.PCISO, "Software/PC ISO"); - caps.Categories.AddCategoryMapping(40, NewznabStandardCategory.ConsolePS3, "Games/PS3"); - caps.Categories.AddCategoryMapping(41, NewznabStandardCategory.TVHD, "TV HD Episodes"); - caps.Categories.AddCategoryMapping(42, NewznabStandardCategory.MoviesBluRay, "Movies/Full BD"); - caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.MoviesHD, "Movies/x264/1080"); - caps.Categories.AddCategoryMapping(45, NewznabStandardCategory.MoviesHD, "Movies/x264/720"); - caps.Categories.AddCategoryMapping(46, NewznabStandardCategory.MoviesBluRay, "Movies/BD Remux"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.Movies3D, "Movies/x264/3D"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.MoviesHD, "Movies/XVID/720"); - caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.TVUHD, "TV UHD Episodes"); - - // torrentapi.org returns "Movies/TV-UHD-episodes" for some reason - // possibly because thats what the category is called on the /top100.php page - caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.TVUHD, "Movies/TV-UHD-episodes"); - caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.MoviesUHD, "Movies/x264/4k"); - caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.MoviesUHD, "Movies/x265/4k"); - caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.MoviesUHD, "Movs/x265/4k/HDR"); - caps.Categories.AddCategoryMapping(53, NewznabStandardCategory.ConsolePS4, "Games/PS4"); - caps.Categories.AddCategoryMapping(54, NewznabStandardCategory.MoviesHD, "Movies/x265/1080"); - - return caps; - } - public override object RequestAction(string action, IDictionary query) { if (action == "checkCaptcha") diff --git a/src/NzbDrone.Core/Indexers/Definitions/Redacted.cs b/src/NzbDrone.Core/Indexers/Definitions/Redacted.cs index 9fe615e10..2e57827be 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Redacted.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Redacted.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Gazelle; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -25,17 +26,11 @@ namespace NzbDrone.Core.Indexers.Definitions public class Redacted : TorrentIndexerBase { public override string Name => "Redacted"; - public override string[] IndexerUrls => new string[] { "https://redacted.ch/" }; - public override string Description => "REDActed (Aka.PassTheHeadPhones) is one of the most well-known music trackers."; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); public override bool SupportsRedirect => true; - public Redacted(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Redacted(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -49,39 +44,6 @@ namespace NzbDrone.Core.Indexers.Definitions return new RedactedParser(Settings, Capabilities.Categories); } - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q, MusicSearchParam.Album, MusicSearchParam.Artist, MusicSearchParam.Label, MusicSearchParam.Year - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PC, "Applications"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.BooksEBook, "E-Books"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.AudioAudiobook, "Audiobooks"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Other, "E-Learning Videos"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.Other, "Comedy"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.BooksComics, "Comics"); - - return caps; - } - protected override async Task Test(List failures) { ((RedactedRequestGenerator)GetRequestGenerator()).FetchPasskey(); diff --git a/src/NzbDrone.Core/Indexers/Definitions/RevolutionTT.cs b/src/NzbDrone.Core/Indexers/Definitions/RevolutionTT.cs index 8c0268708..29749686a 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/RevolutionTT.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/RevolutionTT.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -26,15 +27,11 @@ namespace NzbDrone.Core.Indexers.Definitions { public override string Name => "RevolutionTT"; - public override string[] IndexerUrls => new string[] { "https://revolutiontt.me/" }; - public override string Description => "The Revolution has begun"; private string LoginUrl => Settings.BaseUrl + "takelogin.php"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public RevolutionTT(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public RevolutionTT(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -93,64 +90,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("23", NewznabStandardCategory.TVAnime); - caps.Categories.AddCategoryMapping("22", NewznabStandardCategory.PC0day); - caps.Categories.AddCategoryMapping("1", NewznabStandardCategory.PCISO); - caps.Categories.AddCategoryMapping("36", NewznabStandardCategory.Books); - caps.Categories.AddCategoryMapping("36", NewznabStandardCategory.BooksEBook); - caps.Categories.AddCategoryMapping("4", NewznabStandardCategory.PCGames); - caps.Categories.AddCategoryMapping("21", NewznabStandardCategory.PCGames); - caps.Categories.AddCategoryMapping("16", NewznabStandardCategory.ConsolePS3); - caps.Categories.AddCategoryMapping("40", NewznabStandardCategory.ConsoleWii); - caps.Categories.AddCategoryMapping("39", NewznabStandardCategory.ConsoleXBox360); - caps.Categories.AddCategoryMapping("35", NewznabStandardCategory.ConsoleNDS); - caps.Categories.AddCategoryMapping("34", NewznabStandardCategory.ConsolePSP); - caps.Categories.AddCategoryMapping("2", NewznabStandardCategory.PCMac); - caps.Categories.AddCategoryMapping("10", NewznabStandardCategory.MoviesBluRay); - caps.Categories.AddCategoryMapping("20", NewznabStandardCategory.MoviesDVD); - caps.Categories.AddCategoryMapping("12", NewznabStandardCategory.MoviesHD); - caps.Categories.AddCategoryMapping("44", NewznabStandardCategory.MoviesOther); - caps.Categories.AddCategoryMapping("11", NewznabStandardCategory.MoviesSD); - caps.Categories.AddCategoryMapping("19", NewznabStandardCategory.MoviesSD); - caps.Categories.AddCategoryMapping("6", NewznabStandardCategory.Audio); - caps.Categories.AddCategoryMapping("8", NewznabStandardCategory.AudioLossless); - caps.Categories.AddCategoryMapping("46", NewznabStandardCategory.AudioOther); - caps.Categories.AddCategoryMapping("29", NewznabStandardCategory.AudioVideo); - caps.Categories.AddCategoryMapping("43", NewznabStandardCategory.TVOther); - caps.Categories.AddCategoryMapping("42", NewznabStandardCategory.TVHD); - caps.Categories.AddCategoryMapping("45", NewznabStandardCategory.TVOther); - caps.Categories.AddCategoryMapping("41", NewznabStandardCategory.TVSD); - caps.Categories.AddCategoryMapping("7", NewznabStandardCategory.TVSD); - caps.Categories.AddCategoryMapping("9", NewznabStandardCategory.XXX); - caps.Categories.AddCategoryMapping("49", NewznabStandardCategory.XXX); - caps.Categories.AddCategoryMapping("47", NewznabStandardCategory.XXXDVD); - caps.Categories.AddCategoryMapping("48", NewznabStandardCategory.XXX); - - return caps; - } } public class RevolutionTTRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/RuTracker.cs b/src/NzbDrone.Core/Indexers/Definitions/RuTracker.cs deleted file mode 100644 index 054acbda3..000000000 --- a/src/NzbDrone.Core/Indexers/Definitions/RuTracker.cs +++ /dev/null @@ -1,1744 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Linq; -using System.Net.Http; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using AngleSharp.Dom; -using AngleSharp.Html.Parser; -using FluentValidation; -using NLog; -using NzbDrone.Common.Http; -using NzbDrone.Core.Annotations; -using NzbDrone.Core.Configuration; -using NzbDrone.Core.Indexers.Exceptions; -using NzbDrone.Core.Indexers.Settings; -using NzbDrone.Core.IndexerSearch.Definitions; -using NzbDrone.Core.Messaging.Events; -using NzbDrone.Core.Parser; -using NzbDrone.Core.Parser.Model; -using NzbDrone.Core.Validation; - -namespace NzbDrone.Core.Indexers.Definitions -{ - public class RuTracker : TorrentIndexerBase - { - public override string Name => "RuTracker"; - public override string[] IndexerUrls => new string[] { "https://rutracker.org/", "https://rutracker.net/" }; - - private string LoginUrl => Settings.BaseUrl + "forum/login.php"; - public override string Description => "RuTracker is a Semi-Private Russian torrent site with a thriving file-sharing community"; - public override string Language => "ru-org"; - public override Encoding Encoding => Encoding.GetEncoding("windows-1251"); - public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.SemiPrivate; - public override IndexerCapabilities Capabilities => SetCapabilities(); - - public RuTracker(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) - { - } - - public override IIndexerRequestGenerator GetRequestGenerator() - { - return new RuTrackerRequestGenerator() { Settings = Settings, Capabilities = Capabilities }; - } - - public override IParseIndexerResponse GetParser() - { - return new RuTrackerParser(Settings, Capabilities.Categories); - } - - protected override async Task DoLogin() - { - var requestBuilder = new HttpRequestBuilder(LoginUrl) - { - LogResponseContent = true, - AllowAutoRedirect = true - }; - - requestBuilder.Method = HttpMethod.Post; - requestBuilder.PostProcess += r => r.RequestTimeout = TimeSpan.FromSeconds(15); - - var cookies = Cookies; - - Cookies = null; - requestBuilder.AddFormParameter("login_username", Settings.Username) - .AddFormParameter("login_password", Settings.Password) - .AddFormParameter("login", "Login") - .SetHeader("Content-Type", "multipart/form-data"); - - var authLoginRequest = requestBuilder.Build(); - - var response = await ExecuteAuth(authLoginRequest); - - if (!response.Content.Contains("id=\"logged-in-username\"")) - { - throw new IndexerAuthException("RuTracker Auth Failed"); - } - - cookies = response.GetCookies(); - UpdateCookies(cookies, DateTime.Now + TimeSpan.FromDays(30)); - - _logger.Debug("RuTracker authentication succeeded."); - } - - protected override bool CheckIfLoginNeeded(HttpResponse httpResponse) - { - if (httpResponse.RedirectUrl.Contains("login.php") || !httpResponse.Content.Contains("id=\"logged-in-username\"")) - { - return true; - } - - return false; - } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.SupportsRawSearch = true; - - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.Movies, "Наше кино"); - caps.Categories.AddCategoryMapping(941, NewznabStandardCategory.Movies, "|- Кино СССР"); - caps.Categories.AddCategoryMapping(1666, NewznabStandardCategory.Movies, "|- Детские отечественные фильмы"); - caps.Categories.AddCategoryMapping(376, NewznabStandardCategory.Movies, "|- Авторские дебюты"); - caps.Categories.AddCategoryMapping(106, NewznabStandardCategory.Movies, "|- Фильмы России и СССР на национальных языках [без перевода]"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.MoviesForeign, "Зарубежное кино"); - caps.Categories.AddCategoryMapping(187, NewznabStandardCategory.MoviesForeign, "|- Классика мирового кинематографа"); - caps.Categories.AddCategoryMapping(2090, NewznabStandardCategory.MoviesForeign, "|- Фильмы до 1990 года"); - caps.Categories.AddCategoryMapping(2221, NewznabStandardCategory.MoviesForeign, "|- Фильмы 1991-2000"); - caps.Categories.AddCategoryMapping(2091, NewznabStandardCategory.MoviesForeign, "|- Фильмы 2001-2005"); - caps.Categories.AddCategoryMapping(2092, NewznabStandardCategory.MoviesForeign, "|- Фильмы 2006-2010"); - caps.Categories.AddCategoryMapping(2093, NewznabStandardCategory.MoviesForeign, "|- Фильмы 2011-2015"); - caps.Categories.AddCategoryMapping(2200, NewznabStandardCategory.MoviesForeign, "|- Фильмы 2016-2020"); - caps.Categories.AddCategoryMapping(1950, NewznabStandardCategory.MoviesForeign, "|- Фильмы 2021-2022"); - caps.Categories.AddCategoryMapping(2540, NewznabStandardCategory.MoviesForeign, "|- Фильмы Ближнего Зарубежья"); - caps.Categories.AddCategoryMapping(934, NewznabStandardCategory.MoviesForeign, "|- Азиатские фильмы"); - caps.Categories.AddCategoryMapping(505, NewznabStandardCategory.MoviesForeign, "|- Индийское кино"); - caps.Categories.AddCategoryMapping(212, NewznabStandardCategory.MoviesForeign, "|- Сборники фильмов"); - caps.Categories.AddCategoryMapping(2459, NewznabStandardCategory.MoviesForeign, "|- Короткий метр"); - caps.Categories.AddCategoryMapping(1235, NewznabStandardCategory.MoviesForeign, "|- Грайндхаус"); - caps.Categories.AddCategoryMapping(166, NewznabStandardCategory.MoviesForeign, "|- Зарубежные фильмы без перевода"); - caps.Categories.AddCategoryMapping(185, NewznabStandardCategory.Audio, "|- Звуковые дорожки и Переводы"); - caps.Categories.AddCategoryMapping(124, NewznabStandardCategory.MoviesOther, "Арт-хаус и авторское кино"); - caps.Categories.AddCategoryMapping(1543, NewznabStandardCategory.MoviesOther, "|- Короткий метр (Арт-хаус и авторское кино)"); - caps.Categories.AddCategoryMapping(709, NewznabStandardCategory.MoviesOther, "|- Документальные фильмы (Арт-хаус и авторское кино)"); - caps.Categories.AddCategoryMapping(1577, NewznabStandardCategory.MoviesOther, "|- Анимация (Арт-хаус и авторское кино)"); - caps.Categories.AddCategoryMapping(511, NewznabStandardCategory.TVOther, "Театр"); - caps.Categories.AddCategoryMapping(93, NewznabStandardCategory.MoviesDVD, "DVD Video"); - caps.Categories.AddCategoryMapping(905, NewznabStandardCategory.MoviesDVD, "|- Классика мирового кинематографа (DVD Video)"); - caps.Categories.AddCategoryMapping(101, NewznabStandardCategory.MoviesDVD, "|- Зарубежное кино (DVD Video)"); - caps.Categories.AddCategoryMapping(100, NewznabStandardCategory.MoviesDVD, "|- Наше кино (DVD Video)"); - caps.Categories.AddCategoryMapping(877, NewznabStandardCategory.MoviesDVD, "|- Фильмы Ближнего Зарубежья (DVD Video)"); - caps.Categories.AddCategoryMapping(1576, NewznabStandardCategory.MoviesDVD, "|- Азиатские фильмы (DVD Video)"); - caps.Categories.AddCategoryMapping(572, NewznabStandardCategory.MoviesDVD, "|- Арт-хаус и авторское кино (DVD Video)"); - caps.Categories.AddCategoryMapping(2220, NewznabStandardCategory.MoviesDVD, "|- Индийское кино (DVD Video)"); - caps.Categories.AddCategoryMapping(1670, NewznabStandardCategory.MoviesDVD, "|- Грайндхаус (DVD Video)"); - caps.Categories.AddCategoryMapping(2198, NewznabStandardCategory.MoviesHD, "HD Video"); - caps.Categories.AddCategoryMapping(1457, NewznabStandardCategory.MoviesUHD, "|- UHD Video"); - caps.Categories.AddCategoryMapping(2199, NewznabStandardCategory.MoviesHD, "|- Классика мирового кинематографа (HD Video)"); - caps.Categories.AddCategoryMapping(313, NewznabStandardCategory.MoviesHD, "|- Зарубежное кино (HD Video)"); - caps.Categories.AddCategoryMapping(312, NewznabStandardCategory.MoviesHD, "|- Наше кино (HD Video)"); - caps.Categories.AddCategoryMapping(1247, NewznabStandardCategory.MoviesHD, "|- Фильмы Ближнего Зарубежья (HD Video)"); - caps.Categories.AddCategoryMapping(2201, NewznabStandardCategory.MoviesHD, "|- Азиатские фильмы (HD Video)"); - caps.Categories.AddCategoryMapping(2339, NewznabStandardCategory.MoviesHD, "|- Арт-хаус и авторское кино (HD Video)"); - caps.Categories.AddCategoryMapping(140, NewznabStandardCategory.MoviesHD, "|- Индийское кино (HD Video)"); - caps.Categories.AddCategoryMapping(194, NewznabStandardCategory.MoviesHD, "|- Грайндхаус (HD Video)"); - caps.Categories.AddCategoryMapping(352, NewznabStandardCategory.Movies3D, "3D/Стерео Кино, Видео, TV и Спорт"); - caps.Categories.AddCategoryMapping(549, NewznabStandardCategory.Movies3D, "|- 3D Кинофильмы"); - caps.Categories.AddCategoryMapping(1213, NewznabStandardCategory.Movies3D, "|- 3D Мультфильмы"); - caps.Categories.AddCategoryMapping(2109, NewznabStandardCategory.Movies3D, "|- 3D Документальные фильмы"); - caps.Categories.AddCategoryMapping(514, NewznabStandardCategory.Movies3D, "|- 3D Спорт"); - caps.Categories.AddCategoryMapping(2097, NewznabStandardCategory.Movies3D, "|- 3D Ролики, Музыкальное видео, Трейлеры к фильмам"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.Movies, "Мультфильмы"); - caps.Categories.AddCategoryMapping(84, NewznabStandardCategory.MoviesUHD, "|- Мультфильмы (UHD Video)"); - caps.Categories.AddCategoryMapping(2343, NewznabStandardCategory.MoviesHD, "|- Отечественные мультфильмы (HD Video)"); - caps.Categories.AddCategoryMapping(930, NewznabStandardCategory.MoviesHD, "|- Иностранные мультфильмы (HD Video)"); - caps.Categories.AddCategoryMapping(2365, NewznabStandardCategory.MoviesHD, "|- Иностранные короткометражные мультфильмы (HD Video)"); - caps.Categories.AddCategoryMapping(1900, NewznabStandardCategory.MoviesDVD, "|- Отечественные мультфильмы (DVD)"); - caps.Categories.AddCategoryMapping(2258, NewznabStandardCategory.MoviesDVD, "|- Иностранные короткометражные мультфильмы (DVD)"); - caps.Categories.AddCategoryMapping(521, NewznabStandardCategory.MoviesDVD, "|- Иностранные мультфильмы (DVD)"); - caps.Categories.AddCategoryMapping(208, NewznabStandardCategory.Movies, "|- Отечественные мультфильмы"); - caps.Categories.AddCategoryMapping(539, NewznabStandardCategory.Movies, "|- Отечественные полнометражные мультфильмы"); - caps.Categories.AddCategoryMapping(209, NewznabStandardCategory.MoviesForeign, "|- Иностранные мультфильмы"); - caps.Categories.AddCategoryMapping(484, NewznabStandardCategory.MoviesForeign, "|- Иностранные короткометражные мультфильмы"); - caps.Categories.AddCategoryMapping(822, NewznabStandardCategory.Movies, "|- Сборники мультфильмов"); - caps.Categories.AddCategoryMapping(181, NewznabStandardCategory.Movies, "|- Мультфильмы без перевода"); - caps.Categories.AddCategoryMapping(921, NewznabStandardCategory.TV, "Мультсериалы"); - caps.Categories.AddCategoryMapping(815, NewznabStandardCategory.TVSD, "|- Мультсериалы (SD Video)"); - caps.Categories.AddCategoryMapping(816, NewznabStandardCategory.TVHD, "|- Мультсериалы (DVD Video)"); - caps.Categories.AddCategoryMapping(1460, NewznabStandardCategory.TVHD, "|- Мультсериалы (HD Video)"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.TVAnime, "Аниме"); - caps.Categories.AddCategoryMapping(1105, NewznabStandardCategory.TVAnime, "|- Аниме (HD Video)"); - caps.Categories.AddCategoryMapping(599, NewznabStandardCategory.TVAnime, "|- Аниме (DVD)"); - caps.Categories.AddCategoryMapping(1389, NewznabStandardCategory.TVAnime, "|- Аниме (основной подраздел)"); - caps.Categories.AddCategoryMapping(1391, NewznabStandardCategory.TVAnime, "|- Аниме (плеерный подраздел)"); - caps.Categories.AddCategoryMapping(2491, NewznabStandardCategory.TVAnime, "|- Аниме (QC подраздел)"); - caps.Categories.AddCategoryMapping(2544, NewznabStandardCategory.TVAnime, "|- Ван-Пис"); - caps.Categories.AddCategoryMapping(1642, NewznabStandardCategory.TVAnime, "|- Гандам"); - caps.Categories.AddCategoryMapping(1390, NewznabStandardCategory.TVAnime, "|- Наруто"); - caps.Categories.AddCategoryMapping(404, NewznabStandardCategory.TVAnime, "|- Покемоны"); - caps.Categories.AddCategoryMapping(893, NewznabStandardCategory.TVAnime, "|- Японские мультфильмы"); - caps.Categories.AddCategoryMapping(809, NewznabStandardCategory.Audio, "|- Звуковые дорожки (Аниме)"); - caps.Categories.AddCategoryMapping(2484, NewznabStandardCategory.TVAnime, "|- Артбуки и журналы (Аниме)"); - caps.Categories.AddCategoryMapping(1386, NewznabStandardCategory.TVAnime, "|- Обои, сканы, аватары, арт"); - caps.Categories.AddCategoryMapping(1387, NewznabStandardCategory.TVAnime, "|- AMV и другие ролики"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.TV, "Русские сериалы"); - caps.Categories.AddCategoryMapping(81, NewznabStandardCategory.TVHD, "|- Русские сериалы (HD Video)"); - caps.Categories.AddCategoryMapping(920, NewznabStandardCategory.TVSD, "|- Русские сериалы (DVD Video)"); - caps.Categories.AddCategoryMapping(80, NewznabStandardCategory.TV, "|- Возвращение Мухтара"); - caps.Categories.AddCategoryMapping(1535, NewznabStandardCategory.TV, "|- Воронины"); - caps.Categories.AddCategoryMapping(188, NewznabStandardCategory.TV, "|- Чернобыль: Зона отчуждения"); - caps.Categories.AddCategoryMapping(91, NewznabStandardCategory.TV, "|- Кухня / Отель Элеон"); - caps.Categories.AddCategoryMapping(990, NewznabStandardCategory.TV, "|- Универ / Универ. Новая общага / СашаТаня"); - caps.Categories.AddCategoryMapping(1408, NewznabStandardCategory.TV, "|- Ольга / Физрук"); - caps.Categories.AddCategoryMapping(175, NewznabStandardCategory.TV, "|- След"); - caps.Categories.AddCategoryMapping(79, NewznabStandardCategory.TV, "|- Солдаты и пр."); - caps.Categories.AddCategoryMapping(104, NewznabStandardCategory.TV, "|- Тайны следствия"); - caps.Categories.AddCategoryMapping(189, NewznabStandardCategory.TVForeign, "Зарубежные сериалы"); - caps.Categories.AddCategoryMapping(842, NewznabStandardCategory.TVForeign, "|- Новинки и сериалы в стадии показа"); - caps.Categories.AddCategoryMapping(235, NewznabStandardCategory.TVForeign, "|- Сериалы США и Канады"); - caps.Categories.AddCategoryMapping(242, NewznabStandardCategory.TVForeign, "|- Сериалы Великобритании и Ирландии"); - caps.Categories.AddCategoryMapping(819, NewznabStandardCategory.TVForeign, "|- Скандинавские сериалы"); - caps.Categories.AddCategoryMapping(1531, NewznabStandardCategory.TVForeign, "|- Испанские сериалы"); - caps.Categories.AddCategoryMapping(721, NewznabStandardCategory.TVForeign, "|- Итальянские сериалы"); - caps.Categories.AddCategoryMapping(1102, NewznabStandardCategory.TVForeign, "|- Европейские сериалы"); - caps.Categories.AddCategoryMapping(1120, NewznabStandardCategory.TVForeign, "|- Сериалы стран Африки, Ближнего и Среднего Востока"); - caps.Categories.AddCategoryMapping(1214, NewznabStandardCategory.TVForeign, "|- Сериалы Австралии и Новой Зеландии"); - caps.Categories.AddCategoryMapping(489, NewznabStandardCategory.TVForeign, "|- Сериалы Ближнего Зарубежья"); - caps.Categories.AddCategoryMapping(387, NewznabStandardCategory.TVForeign, "|- Сериалы совместного производства нескольких стран"); - caps.Categories.AddCategoryMapping(1359, NewznabStandardCategory.TVForeign, "|- Веб-сериалы, Вебизоды к сериалам и Пилотные серии сериалов"); - caps.Categories.AddCategoryMapping(184, NewznabStandardCategory.TVForeign, "|- Бесстыжие / Shameless (US)"); - caps.Categories.AddCategoryMapping(1171, NewznabStandardCategory.TVForeign, "|- Викинги / Vikings"); - caps.Categories.AddCategoryMapping(1417, NewznabStandardCategory.TVForeign, "|- Во все тяжкие / Breaking Bad"); - caps.Categories.AddCategoryMapping(625, NewznabStandardCategory.TVForeign, "|- Доктор Хаус / House M.D."); - caps.Categories.AddCategoryMapping(1449, NewznabStandardCategory.TVForeign, "|- Игра престолов / Game of Thrones"); - caps.Categories.AddCategoryMapping(273, NewznabStandardCategory.TVForeign, "|- Карточный Домик / House of Cards"); - caps.Categories.AddCategoryMapping(504, NewznabStandardCategory.TVForeign, "|- Клан Сопрано / The Sopranos"); - caps.Categories.AddCategoryMapping(372, NewznabStandardCategory.TVForeign, "|- Сверхъестественное / Supernatural"); - caps.Categories.AddCategoryMapping(110, NewznabStandardCategory.TVForeign, "|- Секретные материалы / The X-Files"); - caps.Categories.AddCategoryMapping(121, NewznabStandardCategory.TVForeign, "|- Твин пикс / Twin Peaks"); - caps.Categories.AddCategoryMapping(507, NewznabStandardCategory.TVForeign, "|- Теория большого взрыва + Детство Шелдона"); - caps.Categories.AddCategoryMapping(536, NewznabStandardCategory.TVForeign, "|- Форс-мажоры / Костюмы в законе / Suits"); - caps.Categories.AddCategoryMapping(1144, NewznabStandardCategory.TVForeign, "|- Ходячие мертвецы + Бойтесь ходячих мертвецов"); - caps.Categories.AddCategoryMapping(173, NewznabStandardCategory.TVForeign, "|- Черное зеркало / Black Mirror"); - caps.Categories.AddCategoryMapping(195, NewznabStandardCategory.TVForeign, "|- Для некондиционных раздач"); - caps.Categories.AddCategoryMapping(2366, NewznabStandardCategory.TVHD, "Зарубежные сериалы (HD Video)"); - caps.Categories.AddCategoryMapping(119, NewznabStandardCategory.TVUHD, "|- Зарубежные сериалы (UHD Video)"); - caps.Categories.AddCategoryMapping(1803, NewznabStandardCategory.TVHD, "|- Новинки и сериалы в стадии показа (HD Video)"); - caps.Categories.AddCategoryMapping(266, NewznabStandardCategory.TVHD, "|- Сериалы США и Канады (HD Video)"); - caps.Categories.AddCategoryMapping(193, NewznabStandardCategory.TVHD, "|- Сериалы Великобритании и Ирландии (HD Video)"); - caps.Categories.AddCategoryMapping(1690, NewznabStandardCategory.TVHD, "|- Скандинавские сериалы (HD Video)"); - caps.Categories.AddCategoryMapping(1459, NewznabStandardCategory.TVHD, "|- Европейские сериалы (HD Video)"); - caps.Categories.AddCategoryMapping(1463, NewznabStandardCategory.TVHD, "|- Сериалы стран Африки, Ближнего и Среднего Востока (HD Video)"); - caps.Categories.AddCategoryMapping(825, NewznabStandardCategory.TVHD, "|- Сериалы Австралии и Новой Зеландии (HD Video)"); - caps.Categories.AddCategoryMapping(1248, NewznabStandardCategory.TVHD, "|- Сериалы Ближнего Зарубежья (HD Video)"); - caps.Categories.AddCategoryMapping(1288, NewznabStandardCategory.TVHD, "|- Сериалы совместного производства нескольких стран (HD Video)"); - caps.Categories.AddCategoryMapping(1669, NewznabStandardCategory.TVHD, "|- Викинги / Vikings (HD Video)"); - caps.Categories.AddCategoryMapping(2393, NewznabStandardCategory.TVHD, "|- Доктор Хаус / House M.D. (HD Video)"); - caps.Categories.AddCategoryMapping(265, NewznabStandardCategory.TVHD, "|- Игра престолов / Game of Thrones (HD Video)"); - caps.Categories.AddCategoryMapping(2406, NewznabStandardCategory.TVHD, "|- Карточный домик (HD Video)"); - caps.Categories.AddCategoryMapping(2404, NewznabStandardCategory.TVHD, "|- Сверхъестественное / Supernatural (HD Video)"); - caps.Categories.AddCategoryMapping(2405, NewznabStandardCategory.TVHD, "|- Секретные материалы / The X-Files (HD Video)"); - caps.Categories.AddCategoryMapping(2370, NewznabStandardCategory.TVHD, "|- Твин пикс / Twin Peaks (HD Video)"); - caps.Categories.AddCategoryMapping(2396, NewznabStandardCategory.TVHD, "|- Теория Большого Взрыва / The Big Bang Theory (HD Video)"); - caps.Categories.AddCategoryMapping(2398, NewznabStandardCategory.TVHD, "|- Ходячие мертвецы + Бойтесь ходячих мертвецов (HD Video)"); - caps.Categories.AddCategoryMapping(1949, NewznabStandardCategory.TVHD, "|- Черное зеркало / Black Mirror (HD Video)"); - caps.Categories.AddCategoryMapping(1498, NewznabStandardCategory.TVHD, "|- Для некондиционных раздач (HD Video)"); - caps.Categories.AddCategoryMapping(911, NewznabStandardCategory.TVForeign, "Сериалы Латинской Америки, Турции и Индии"); - caps.Categories.AddCategoryMapping(1493, NewznabStandardCategory.TVForeign, "|- Актёры и актрисы латиноамериканских сериалов"); - caps.Categories.AddCategoryMapping(325, NewznabStandardCategory.TVForeign, "|- Сериалы Аргентины"); - caps.Categories.AddCategoryMapping(534, NewznabStandardCategory.TVForeign, "|- Сериалы Бразилии"); - caps.Categories.AddCategoryMapping(594, NewznabStandardCategory.TVForeign, "|- Сериалы Венесуэлы"); - caps.Categories.AddCategoryMapping(1301, NewznabStandardCategory.TVForeign, "|- Сериалы Индии"); - caps.Categories.AddCategoryMapping(607, NewznabStandardCategory.TVForeign, "|- Сериалы Колумбии"); - caps.Categories.AddCategoryMapping(1574, NewznabStandardCategory.TVForeign, "|- Сериалы Латинской Америки с озвучкой (раздачи папками)"); - caps.Categories.AddCategoryMapping(1539, NewznabStandardCategory.TVForeign, "|- Сериалы Латинской Америки с субтитрами"); - caps.Categories.AddCategoryMapping(1940, NewznabStandardCategory.TVForeign, "|- Официальные краткие версии сериалов Латинской Америки"); - caps.Categories.AddCategoryMapping(694, NewznabStandardCategory.TVForeign, "|- Сериалы Мексики"); - caps.Categories.AddCategoryMapping(775, NewznabStandardCategory.TVForeign, "|- Сериалы Перу, Сальвадора, Чили и других стран"); - caps.Categories.AddCategoryMapping(781, NewznabStandardCategory.TVForeign, "|- Сериалы совместного производства"); - caps.Categories.AddCategoryMapping(718, NewznabStandardCategory.TVForeign, "|- Сериалы США (латиноамериканские)"); - caps.Categories.AddCategoryMapping(704, NewznabStandardCategory.TVForeign, "|- Сериалы Турции"); - caps.Categories.AddCategoryMapping(1537, NewznabStandardCategory.TVForeign, "|- Для некондиционных раздач"); - caps.Categories.AddCategoryMapping(2100, NewznabStandardCategory.TVForeign, "Азиатские сериалы"); - caps.Categories.AddCategoryMapping(717, NewznabStandardCategory.TVForeign, "|- Китайские сериалы с субтитрами"); - caps.Categories.AddCategoryMapping(915, NewznabStandardCategory.TVForeign, "|- Корейские сериалы с озвучкой"); - caps.Categories.AddCategoryMapping(1242, NewznabStandardCategory.TVForeign, "|- Корейские сериалы с субтитрами"); - caps.Categories.AddCategoryMapping(2412, NewznabStandardCategory.TVForeign, "|- Прочие азиатские сериалы с озвучкой"); - caps.Categories.AddCategoryMapping(1938, NewznabStandardCategory.TVForeign, "|- Тайваньские сериалы с субтитрами"); - caps.Categories.AddCategoryMapping(2104, NewznabStandardCategory.TVForeign, "|- Японские сериалы с субтитрами"); - caps.Categories.AddCategoryMapping(1939, NewznabStandardCategory.TVForeign, "|- Японские сериалы с озвучкой"); - caps.Categories.AddCategoryMapping(2102, NewznabStandardCategory.TVForeign, "|- VMV и др. ролики"); - caps.Categories.AddCategoryMapping(670, NewznabStandardCategory.TVDocumentary, "Вера и религия"); - caps.Categories.AddCategoryMapping(1475, NewznabStandardCategory.TVDocumentary, "|- [Видео Религия] Христианство"); - caps.Categories.AddCategoryMapping(2107, NewznabStandardCategory.TVDocumentary, "|- [Видео Религия] Ислам"); - caps.Categories.AddCategoryMapping(294, NewznabStandardCategory.TVDocumentary, "|- [Видео Религия] Религии Индии, Тибета и Восточной Азии"); - caps.Categories.AddCategoryMapping(1453, NewznabStandardCategory.TVDocumentary, "|- [Видео Религия] Культы и новые религиозные движения"); - caps.Categories.AddCategoryMapping(46, NewznabStandardCategory.TVDocumentary, "Документальные фильмы и телепередачи"); - caps.Categories.AddCategoryMapping(103, NewznabStandardCategory.TVDocumentary, "|- Документальные (DVD)"); - caps.Categories.AddCategoryMapping(671, NewznabStandardCategory.TVDocumentary, "|- [Док] Биографии. Личности и кумиры"); - caps.Categories.AddCategoryMapping(2177, NewznabStandardCategory.TVDocumentary, "|- [Док] Кинематограф и мультипликация"); - caps.Categories.AddCategoryMapping(656, NewznabStandardCategory.TVDocumentary, "|- [Док] Мастера искусств Театра и Кино"); - caps.Categories.AddCategoryMapping(2538, NewznabStandardCategory.TVDocumentary, "|- [Док] Искусство, история искусств"); - caps.Categories.AddCategoryMapping(2159, NewznabStandardCategory.TVDocumentary, "|- [Док] Музыка"); - caps.Categories.AddCategoryMapping(251, NewznabStandardCategory.TVDocumentary, "|- [Док] Криминальная документалистика"); - caps.Categories.AddCategoryMapping(98, NewznabStandardCategory.TVDocumentary, "|- [Док] Тайны века / Спецслужбы / Теории Заговоров"); - caps.Categories.AddCategoryMapping(97, NewznabStandardCategory.TVDocumentary, "|- [Док] Военное дело"); - caps.Categories.AddCategoryMapping(851, NewznabStandardCategory.TVDocumentary, "|- [Док] Вторая мировая война"); - caps.Categories.AddCategoryMapping(2178, NewznabStandardCategory.TVDocumentary, "|- [Док] Аварии / Катастрофы / Катаклизмы"); - caps.Categories.AddCategoryMapping(821, NewznabStandardCategory.TVDocumentary, "|- [Док] Авиация"); - caps.Categories.AddCategoryMapping(2076, NewznabStandardCategory.TVDocumentary, "|- [Док] Космос"); - caps.Categories.AddCategoryMapping(56, NewznabStandardCategory.TVDocumentary, "|- [Док] Научно-популярные фильмы"); - caps.Categories.AddCategoryMapping(2123, NewznabStandardCategory.TVDocumentary, "|- [Док] Флора и фауна"); - caps.Categories.AddCategoryMapping(876, NewznabStandardCategory.TVDocumentary, "|- [Док] Путешествия и туризм"); - caps.Categories.AddCategoryMapping(2139, NewznabStandardCategory.TVDocumentary, "|- [Док] Медицина"); - caps.Categories.AddCategoryMapping(2380, NewznabStandardCategory.TVDocumentary, "|- [Док] Социальные ток-шоу"); - caps.Categories.AddCategoryMapping(1467, NewznabStandardCategory.TVDocumentary, "|- [Док] Информационно-аналитические и общественно-политические передачи"); - caps.Categories.AddCategoryMapping(1469, NewznabStandardCategory.TVDocumentary, "|- [Док] Архитектура и строительство"); - caps.Categories.AddCategoryMapping(672, NewznabStandardCategory.TVDocumentary, "|- [Док] Всё о доме, быте и дизайне"); - caps.Categories.AddCategoryMapping(249, NewznabStandardCategory.TVDocumentary, "|- [Док] BBC"); - caps.Categories.AddCategoryMapping(552, NewznabStandardCategory.TVDocumentary, "|- [Док] Discovery"); - caps.Categories.AddCategoryMapping(500, NewznabStandardCategory.TVDocumentary, "|- [Док] National Geographic"); - caps.Categories.AddCategoryMapping(2112, NewznabStandardCategory.TVDocumentary, "|- [Док] История: Древний мир / Античность / Средневековье"); - caps.Categories.AddCategoryMapping(1327, NewznabStandardCategory.TVDocumentary, "|- [Док] История: Новое и Новейшее время"); - caps.Categories.AddCategoryMapping(1468, NewznabStandardCategory.TVDocumentary, "|- [Док] Эпоха СССР"); - caps.Categories.AddCategoryMapping(1280, NewznabStandardCategory.TVDocumentary, "|- [Док] Битва экстрасенсов / Теория невероятности / Искатели / Галилео"); - caps.Categories.AddCategoryMapping(752, NewznabStandardCategory.TVDocumentary, "|- [Док] Русские сенсации / Программа Максимум / Профессия репортёр"); - caps.Categories.AddCategoryMapping(1114, NewznabStandardCategory.TVDocumentary, "|- [Док] Паранормальные явления"); - caps.Categories.AddCategoryMapping(2168, NewznabStandardCategory.TVDocumentary, "|- [Док] Альтернативная история и наука"); - caps.Categories.AddCategoryMapping(2160, NewznabStandardCategory.TVDocumentary, "|- [Док] Внежанровая документалистика"); - caps.Categories.AddCategoryMapping(2176, NewznabStandardCategory.TVDocumentary, "|- [Док] Разное / некондиция"); - caps.Categories.AddCategoryMapping(314, NewznabStandardCategory.TVDocumentary, "Документальные (HD Video)"); - caps.Categories.AddCategoryMapping(2323, NewznabStandardCategory.TVDocumentary, "|- Информационно-аналитические и общественно-политические (HD Video)"); - caps.Categories.AddCategoryMapping(1278, NewznabStandardCategory.TVDocumentary, "|- Биографии. Личности и кумиры (HD Video)"); - caps.Categories.AddCategoryMapping(1281, NewznabStandardCategory.TVDocumentary, "|- Военное дело (HD Video)"); - caps.Categories.AddCategoryMapping(2110, NewznabStandardCategory.TVDocumentary, "|- Естествознание, наука и техника (HD Video)"); - caps.Categories.AddCategoryMapping(979, NewznabStandardCategory.TVDocumentary, "|- Путешествия и туризм (HD Video)"); - caps.Categories.AddCategoryMapping(2169, NewznabStandardCategory.TVDocumentary, "|- Флора и фауна (HD Video)"); - caps.Categories.AddCategoryMapping(2166, NewznabStandardCategory.TVDocumentary, "|- История (HD Video)"); - caps.Categories.AddCategoryMapping(2164, NewznabStandardCategory.TVDocumentary, "|- BBC, Discovery, National Geographic, History Channel (HD Video)"); - caps.Categories.AddCategoryMapping(2163, NewznabStandardCategory.TVDocumentary, "|- Криминальная документалистика (HD Video)"); - caps.Categories.AddCategoryMapping(85, NewznabStandardCategory.TVDocumentary, "|- Некондиционное видео - Документальные (HD Video)"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.TVDocumentary, "Развлекательные телепередачи и шоу, приколы и юмор"); - caps.Categories.AddCategoryMapping(1959, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Интеллектуальные игры и викторины"); - caps.Categories.AddCategoryMapping(939, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Реалити и ток-шоу / номинации / показы"); - caps.Categories.AddCategoryMapping(1481, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Детские телешоу"); - caps.Categories.AddCategoryMapping(113, NewznabStandardCategory.TVOther, "|- [Видео Юмор] КВН"); - caps.Categories.AddCategoryMapping(115, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Пост КВН"); - caps.Categories.AddCategoryMapping(882, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Кривое Зеркало / Городок / В Городке"); - caps.Categories.AddCategoryMapping(1482, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Ледовые шоу"); - caps.Categories.AddCategoryMapping(393, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Музыкальные шоу"); - caps.Categories.AddCategoryMapping(1569, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Званый ужин"); - caps.Categories.AddCategoryMapping(373, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Хорошие Шутки"); - caps.Categories.AddCategoryMapping(1186, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Вечерний Квартал"); - caps.Categories.AddCategoryMapping(137, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Фильмы со смешным переводом (пародии)"); - caps.Categories.AddCategoryMapping(2537, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Stand-up comedy"); - caps.Categories.AddCategoryMapping(532, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Украинские Шоу"); - caps.Categories.AddCategoryMapping(827, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Танцевальные шоу, концерты, выступления"); - caps.Categories.AddCategoryMapping(1484, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Цирк"); - caps.Categories.AddCategoryMapping(1485, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Школа злословия"); - caps.Categories.AddCategoryMapping(114, NewznabStandardCategory.TVOther, "|- [Видео Юмор] Сатирики и юмористы"); - caps.Categories.AddCategoryMapping(1332, NewznabStandardCategory.TVOther, "|- Юмористические аудиопередачи"); - caps.Categories.AddCategoryMapping(1495, NewznabStandardCategory.TVOther, "|- Аудио и видео ролики (Приколы и юмор)"); - caps.Categories.AddCategoryMapping(1392, NewznabStandardCategory.TVSport, "XXXII Летние Олимпийские игры 2020"); - caps.Categories.AddCategoryMapping(2475, NewznabStandardCategory.TVSport, "|- Легкая атлетика"); - caps.Categories.AddCategoryMapping(2493, NewznabStandardCategory.TVSport, "|- Плавание. Прыжки в воду. Синхронное плавание"); - caps.Categories.AddCategoryMapping(2113, NewznabStandardCategory.TVSport, "|- Спортивная гимнастика. Художественная гимнастика. Прыжки на батуте"); - caps.Categories.AddCategoryMapping(2482, NewznabStandardCategory.TVSport, "|- Велоспорт"); - caps.Categories.AddCategoryMapping(2103, NewznabStandardCategory.TVSport, "|- Академическая гребля. Гребля на байдарках и каноэ"); - caps.Categories.AddCategoryMapping(2522, NewznabStandardCategory.TVSport, "|- Бокс. Борьба Вольная и Греко-римская. Дзюдо. Карате. Тхэквондо"); - caps.Categories.AddCategoryMapping(2485, NewznabStandardCategory.TVSport, "|- Футбол"); - caps.Categories.AddCategoryMapping(2486, NewznabStandardCategory.TVSport, "|- Баскетбол. Волейбол. Гандбол. Водное поло. Регби. Хоккей на траве"); - caps.Categories.AddCategoryMapping(2479, NewznabStandardCategory.TVSport, "|- Теннис. Настольный теннис. Бадминтон"); - caps.Categories.AddCategoryMapping(2089, NewznabStandardCategory.TVSport, "|- Фехтование. Стрельба. Стрельба из лука. Современное пятиборье"); - caps.Categories.AddCategoryMapping(1794, NewznabStandardCategory.TVSport, "|- Другие виды спорта"); - caps.Categories.AddCategoryMapping(2338, NewznabStandardCategory.TVSport, "|- Обзорные и аналитические программы"); - caps.Categories.AddCategoryMapping(1315, NewznabStandardCategory.TVSport, "XXIV Зимние Олимпийские игры 2022"); - caps.Categories.AddCategoryMapping(1336, NewznabStandardCategory.TVSport, "|- Биатлон"); - caps.Categories.AddCategoryMapping(2171, NewznabStandardCategory.TVSport, "|- Лыжные гонки"); - caps.Categories.AddCategoryMapping(1339, NewznabStandardCategory.TVSport, "|- Прыжки на лыжах с трамплина / Лыжное двоеборье"); - caps.Categories.AddCategoryMapping(2455, NewznabStandardCategory.TVSport, "|- Горные лыжи / Сноубординг / Фристайл"); - caps.Categories.AddCategoryMapping(1434, NewznabStandardCategory.TVSport, "|- Бобслей / Санный спорт / Скелетон"); - caps.Categories.AddCategoryMapping(2350, NewznabStandardCategory.TVSport, "|- Конькобежный спорт / Шорт-трек"); - caps.Categories.AddCategoryMapping(1472, NewznabStandardCategory.TVSport, "|- Фигурное катание"); - caps.Categories.AddCategoryMapping(2068, NewznabStandardCategory.TVSport, "|- Хоккей"); - caps.Categories.AddCategoryMapping(2016, NewznabStandardCategory.TVSport, "|- Керлинг"); - caps.Categories.AddCategoryMapping(1311, NewznabStandardCategory.TVSport, "|- Обзорные и аналитические программы"); - caps.Categories.AddCategoryMapping(255, NewznabStandardCategory.TVSport, "Спортивные турниры, фильмы и передачи"); - caps.Categories.AddCategoryMapping(256, NewznabStandardCategory.TVSport, "|- Автоспорт"); - caps.Categories.AddCategoryMapping(1986, NewznabStandardCategory.TVSport, "|- Мотоспорт"); - caps.Categories.AddCategoryMapping(660, NewznabStandardCategory.TVSport, "|- Формула-1 (2021)"); - caps.Categories.AddCategoryMapping(1551, NewznabStandardCategory.TVSport, "|- Формула-1 (2012-2020)"); - caps.Categories.AddCategoryMapping(626, NewznabStandardCategory.TVSport, "|- Формула 1 (до 2011 вкл.)"); - caps.Categories.AddCategoryMapping(262, NewznabStandardCategory.TVSport, "|- Велоспорт"); - caps.Categories.AddCategoryMapping(1326, NewznabStandardCategory.TVSport, "|- Волейбол/Гандбол"); - caps.Categories.AddCategoryMapping(978, NewznabStandardCategory.TVSport, "|- Бильярд"); - caps.Categories.AddCategoryMapping(1287, NewznabStandardCategory.TVSport, "|- Покер"); - caps.Categories.AddCategoryMapping(1188, NewznabStandardCategory.TVSport, "|- Бодибилдинг/Силовые виды спорта"); - caps.Categories.AddCategoryMapping(1667, NewznabStandardCategory.TVSport, "|- Бокс"); - caps.Categories.AddCategoryMapping(1675, NewznabStandardCategory.TVSport, "|- Классические единоборства"); - caps.Categories.AddCategoryMapping(257, NewznabStandardCategory.TVSport, "|- Смешанные единоборства и K-1"); - caps.Categories.AddCategoryMapping(875, NewznabStandardCategory.TVSport, "|- Американский футбол"); - caps.Categories.AddCategoryMapping(263, NewznabStandardCategory.TVSport, "|- Регби"); - caps.Categories.AddCategoryMapping(2073, NewznabStandardCategory.TVSport, "|- Бейсбол"); - caps.Categories.AddCategoryMapping(550, NewznabStandardCategory.TVSport, "|- Теннис"); - caps.Categories.AddCategoryMapping(2124, NewznabStandardCategory.TVSport, "|- Бадминтон/Настольный теннис"); - caps.Categories.AddCategoryMapping(1470, NewznabStandardCategory.TVSport, "|- Гимнастика/Соревнования по танцам"); - caps.Categories.AddCategoryMapping(528, NewznabStandardCategory.TVSport, "|- Лёгкая атлетика/Водные виды спорта"); - caps.Categories.AddCategoryMapping(486, NewznabStandardCategory.TVSport, "|- Зимние виды спорта"); - caps.Categories.AddCategoryMapping(854, NewznabStandardCategory.TVSport, "|- Фигурное катание"); - caps.Categories.AddCategoryMapping(2079, NewznabStandardCategory.TVSport, "|- Биатлон"); - caps.Categories.AddCategoryMapping(260, NewznabStandardCategory.TVSport, "|- Экстрим"); - caps.Categories.AddCategoryMapping(1319, NewznabStandardCategory.TVSport, "|- Спорт (видео)"); - caps.Categories.AddCategoryMapping(1608, NewznabStandardCategory.TVSport, "⚽ Футбол"); - caps.Categories.AddCategoryMapping(2294, NewznabStandardCategory.TVSport, "|- UHDTV"); - caps.Categories.AddCategoryMapping(2532, NewznabStandardCategory.TVSport, "|- Чемпионат Европы 2020 [2021] (финальный турнир)"); - caps.Categories.AddCategoryMapping(136, NewznabStandardCategory.TVSport, "|- Чемпионат Европы 2020 [2021] (отбор)"); - caps.Categories.AddCategoryMapping(592, NewznabStandardCategory.TVSport, "|- Лига Наций"); - caps.Categories.AddCategoryMapping(1693, NewznabStandardCategory.TVSport, "|- Чемпионат Мира 2022 (отбор)"); - caps.Categories.AddCategoryMapping(2533, NewznabStandardCategory.TVSport, "|- Чемпионат Мира 2018 (игры)"); - caps.Categories.AddCategoryMapping(1952, NewznabStandardCategory.TVSport, "|- Чемпионат Мира 2018 (обзорные передачи, документалистика)"); - caps.Categories.AddCategoryMapping(1621, NewznabStandardCategory.TVSport, "|- Чемпионаты Мира"); - caps.Categories.AddCategoryMapping(1668, NewznabStandardCategory.TVSport, "|- Россия 2021-2022"); - caps.Categories.AddCategoryMapping(2075, NewznabStandardCategory.TVSport, "|- Россия 2020-2021"); - caps.Categories.AddCategoryMapping(1613, NewznabStandardCategory.TVSport, "|- Россия/СССР"); - caps.Categories.AddCategoryMapping(1614, NewznabStandardCategory.TVSport, "|- Англия"); - caps.Categories.AddCategoryMapping(1623, NewznabStandardCategory.TVSport, "|- Испания"); - caps.Categories.AddCategoryMapping(1615, NewznabStandardCategory.TVSport, "|- Италия"); - caps.Categories.AddCategoryMapping(1630, NewznabStandardCategory.TVSport, "|- Германия"); - caps.Categories.AddCategoryMapping(2425, NewznabStandardCategory.TVSport, "|- Франция"); - caps.Categories.AddCategoryMapping(2514, NewznabStandardCategory.TVSport, "|- Украина"); - caps.Categories.AddCategoryMapping(1616, NewznabStandardCategory.TVSport, "|- Другие национальные чемпионаты и кубки"); - caps.Categories.AddCategoryMapping(2014, NewznabStandardCategory.TVSport, "|- Международные турниры"); - caps.Categories.AddCategoryMapping(1491, NewznabStandardCategory.TVSport, "|- Еврокубки 2021-2022"); - caps.Categories.AddCategoryMapping(1442, NewznabStandardCategory.TVSport, "|- Еврокубки 2020-2021"); - caps.Categories.AddCategoryMapping(1987, NewznabStandardCategory.TVSport, "|- Еврокубки 2011-2020"); - caps.Categories.AddCategoryMapping(1617, NewznabStandardCategory.TVSport, "|- Еврокубки"); - caps.Categories.AddCategoryMapping(1620, NewznabStandardCategory.TVSport, "|- Чемпионаты Европы"); - caps.Categories.AddCategoryMapping(1998, NewznabStandardCategory.TVSport, "|- Товарищеские турниры и матчи"); - caps.Categories.AddCategoryMapping(1343, NewznabStandardCategory.TVSport, "|- Обзорные и аналитические передачи 2018-2021"); - caps.Categories.AddCategoryMapping(751, NewznabStandardCategory.TVSport, "|- Обзорные и аналитические передачи"); - caps.Categories.AddCategoryMapping(497, NewznabStandardCategory.TVSport, "|- Документальные фильмы (футбол)"); - caps.Categories.AddCategoryMapping(1697, NewznabStandardCategory.TVSport, "|- Мини-футбол/Пляжный футбол"); - caps.Categories.AddCategoryMapping(2004, NewznabStandardCategory.TVSport, "🏀 Баскетбол"); - caps.Categories.AddCategoryMapping(2001, NewznabStandardCategory.TVSport, "|- Международные соревнования"); - caps.Categories.AddCategoryMapping(2002, NewznabStandardCategory.TVSport, "|- NBA / NCAA (до 2000 г.)"); - caps.Categories.AddCategoryMapping(283, NewznabStandardCategory.TVSport, "|- NBA / NCAA (2000-2010 гг.)"); - caps.Categories.AddCategoryMapping(1997, NewznabStandardCategory.TVSport, "|- NBA / NCAA (2010-2022 гг.)"); - caps.Categories.AddCategoryMapping(2003, NewznabStandardCategory.TVSport, "|- Европейский клубный баскетбол"); - caps.Categories.AddCategoryMapping(2009, NewznabStandardCategory.TVSport, "🏒 Хоккей"); - caps.Categories.AddCategoryMapping(2010, NewznabStandardCategory.TVSport, "|- Хоккей с мячом / Бенди"); - caps.Categories.AddCategoryMapping(1229, NewznabStandardCategory.TVSport, "|- Чемпионат Мира по хоккею 2021"); - caps.Categories.AddCategoryMapping(2006, NewznabStandardCategory.TVSport, "|- Международные турниры"); - caps.Categories.AddCategoryMapping(2007, NewznabStandardCategory.TVSport, "|- КХЛ"); - caps.Categories.AddCategoryMapping(2005, NewznabStandardCategory.TVSport, "|- НХЛ (до 2011/12)"); - caps.Categories.AddCategoryMapping(259, NewznabStandardCategory.TVSport, "|- НХЛ (с 2013)"); - caps.Categories.AddCategoryMapping(2008, NewznabStandardCategory.TVSport, "|- СССР - Канада"); - caps.Categories.AddCategoryMapping(126, NewznabStandardCategory.TVSport, "|- Документальные фильмы и аналитика"); - caps.Categories.AddCategoryMapping(845, NewznabStandardCategory.TVSport, "Рестлинг"); - caps.Categories.AddCategoryMapping(343, NewznabStandardCategory.TVSport, "|- Professional Wrestling"); - caps.Categories.AddCategoryMapping(2111, NewznabStandardCategory.TVSport, "|- Independent Wrestling"); - caps.Categories.AddCategoryMapping(1527, NewznabStandardCategory.TVSport, "|- International Wrestling"); - caps.Categories.AddCategoryMapping(2069, NewznabStandardCategory.TVSport, "|- Oldschool Wrestling"); - caps.Categories.AddCategoryMapping(1323, NewznabStandardCategory.TVSport, "|- Documentary Wrestling"); - caps.Categories.AddCategoryMapping(1346, NewznabStandardCategory.TVSport, "Для дооформления раздач"); - caps.Categories.AddCategoryMapping(1411, NewznabStandardCategory.TVSport, "|- Сканирование, обработка сканов"); - caps.Categories.AddCategoryMapping(21, NewznabStandardCategory.Books, "Книги и журналы (общий раздел)"); - caps.Categories.AddCategoryMapping(2157, NewznabStandardCategory.Books, "|- Кино, театр, ТВ, мультипликация, цирк"); - caps.Categories.AddCategoryMapping(765, NewznabStandardCategory.Books, "|- Рисунок, графический дизайн"); - caps.Categories.AddCategoryMapping(2019, NewznabStandardCategory.Books, "|- Фото и видеосъемка"); - caps.Categories.AddCategoryMapping(31, NewznabStandardCategory.BooksMags, "|- Журналы и газеты (общий раздел)"); - caps.Categories.AddCategoryMapping(1427, NewznabStandardCategory.Books, "|- Эзотерика, гадания, магия, фен-шуй"); - caps.Categories.AddCategoryMapping(2422, NewznabStandardCategory.Books, "|- Астрология"); - caps.Categories.AddCategoryMapping(2195, NewznabStandardCategory.Books, "|- Красота. Уход. Домоводство"); - caps.Categories.AddCategoryMapping(2521, NewznabStandardCategory.Books, "|- Мода. Стиль. Этикет"); - caps.Categories.AddCategoryMapping(2223, NewznabStandardCategory.Books, "|- Путешествия и туризм"); - caps.Categories.AddCategoryMapping(2447, NewznabStandardCategory.Books, "|- Знаменитости и кумиры"); - caps.Categories.AddCategoryMapping(39, NewznabStandardCategory.Books, "|- Разное (книги)"); - caps.Categories.AddCategoryMapping(2086, NewznabStandardCategory.Books, "|- Самиздат, статьи из журналов, фрагменты книг"); - caps.Categories.AddCategoryMapping(1101, NewznabStandardCategory.Books, "Для детей, родителей и учителей"); - caps.Categories.AddCategoryMapping(745, NewznabStandardCategory.Books, "|- Учебная литература для детского сада и начальной школы (до 4 класса)"); - caps.Categories.AddCategoryMapping(1689, NewznabStandardCategory.Books, "|- Учебная литература для старших классов (5-11 класс)"); - caps.Categories.AddCategoryMapping(2336, NewznabStandardCategory.Books, "|- Учителям и педагогам"); - caps.Categories.AddCategoryMapping(2337, NewznabStandardCategory.Books, "|- Научно-популярная и познавательная литература (для детей)"); - caps.Categories.AddCategoryMapping(1353, NewznabStandardCategory.Books, "|- Досуг и творчество"); - caps.Categories.AddCategoryMapping(1400, NewznabStandardCategory.Books, "|- Воспитание и развитие"); - caps.Categories.AddCategoryMapping(1415, NewznabStandardCategory.Books, "|- Худ. лит-ра для дошкольников и младших классов"); - caps.Categories.AddCategoryMapping(2046, NewznabStandardCategory.Books, "|- Худ. лит-ра для средних и старших классов"); - caps.Categories.AddCategoryMapping(1802, NewznabStandardCategory.Books, "Спорт, физическая культура, боевые искусства"); - caps.Categories.AddCategoryMapping(2189, NewznabStandardCategory.Books, "|- Футбол (книги и журналы)"); - caps.Categories.AddCategoryMapping(2190, NewznabStandardCategory.Books, "|- Хоккей (книги и журналы)"); - caps.Categories.AddCategoryMapping(2443, NewznabStandardCategory.Books, "|- Игровые виды спорта"); - caps.Categories.AddCategoryMapping(1477, NewznabStandardCategory.Books, "|- Легкая атлетика. Плавание. Гимнастика. Тяжелая атлетика. Гребля"); - caps.Categories.AddCategoryMapping(669, NewznabStandardCategory.Books, "|- Автоспорт. Мотоспорт. Велоспорт"); - caps.Categories.AddCategoryMapping(2196, NewznabStandardCategory.Books, "|- Шахматы. Шашки"); - caps.Categories.AddCategoryMapping(2056, NewznabStandardCategory.Books, "|- Боевые искусства, единоборства"); - caps.Categories.AddCategoryMapping(1436, NewznabStandardCategory.Books, "|- Экстрим (книги)"); - caps.Categories.AddCategoryMapping(2191, NewznabStandardCategory.Books, "|- Физкультура, фитнес, бодибилдинг"); - caps.Categories.AddCategoryMapping(2477, NewznabStandardCategory.Books, "|- Спортивная пресса"); - caps.Categories.AddCategoryMapping(1680, NewznabStandardCategory.Books, "Гуманитарные науки"); - caps.Categories.AddCategoryMapping(1684, NewznabStandardCategory.Books, "|- Искусствоведение. Культурология"); - caps.Categories.AddCategoryMapping(2446, NewznabStandardCategory.Books, "|- Фольклор. Эпос. Мифология"); - caps.Categories.AddCategoryMapping(2524, NewznabStandardCategory.Books, "|- Литературоведение"); - caps.Categories.AddCategoryMapping(2525, NewznabStandardCategory.Books, "|- Лингвистика"); - caps.Categories.AddCategoryMapping(995, NewznabStandardCategory.Books, "|- Философия"); - caps.Categories.AddCategoryMapping(2022, NewznabStandardCategory.Books, "|- Политология"); - caps.Categories.AddCategoryMapping(2471, NewznabStandardCategory.Books, "|- Социология"); - caps.Categories.AddCategoryMapping(2375, NewznabStandardCategory.Books, "|- Публицистика, журналистика"); - caps.Categories.AddCategoryMapping(764, NewznabStandardCategory.Books, "|- Бизнес, менеджмент"); - caps.Categories.AddCategoryMapping(1685, NewznabStandardCategory.Books, "|- Маркетинг"); - caps.Categories.AddCategoryMapping(1688, NewznabStandardCategory.Books, "|- Экономика"); - caps.Categories.AddCategoryMapping(2472, NewznabStandardCategory.Books, "|- Финансы"); - caps.Categories.AddCategoryMapping(1687, NewznabStandardCategory.Books, "|- Юридические науки. Право. Криминалистика"); - caps.Categories.AddCategoryMapping(2020, NewznabStandardCategory.Books, "Исторические науки"); - caps.Categories.AddCategoryMapping(1349, NewznabStandardCategory.Books, "|- Методология и философия исторической науки"); - caps.Categories.AddCategoryMapping(1967, NewznabStandardCategory.Books, "|- Исторические источники (книги, периодика)"); - caps.Categories.AddCategoryMapping(1341, NewznabStandardCategory.Books, "|- Исторические источники (документы)"); - caps.Categories.AddCategoryMapping(2049, NewznabStandardCategory.Books, "|- Исторические персоны"); - caps.Categories.AddCategoryMapping(1681, NewznabStandardCategory.Books, "|- Альтернативные исторические теории"); - caps.Categories.AddCategoryMapping(2319, NewznabStandardCategory.Books, "|- Археология"); - caps.Categories.AddCategoryMapping(2434, NewznabStandardCategory.Books, "|- Древний мир. Античность"); - caps.Categories.AddCategoryMapping(1683, NewznabStandardCategory.Books, "|- Средние века"); - caps.Categories.AddCategoryMapping(2444, NewznabStandardCategory.Books, "|- История Нового и Новейшего времени"); - caps.Categories.AddCategoryMapping(2427, NewznabStandardCategory.Books, "|- История Европы"); - caps.Categories.AddCategoryMapping(2452, NewznabStandardCategory.Books, "|- История Азии и Африки"); - caps.Categories.AddCategoryMapping(2445, NewznabStandardCategory.Books, "|- История Америки, Австралии, Океании"); - caps.Categories.AddCategoryMapping(2435, NewznabStandardCategory.Books, "|- История России"); - caps.Categories.AddCategoryMapping(667, NewznabStandardCategory.Books, "|- История России до 1917 года"); - caps.Categories.AddCategoryMapping(2436, NewznabStandardCategory.Books, "|- Эпоха СССР"); - caps.Categories.AddCategoryMapping(1335, NewznabStandardCategory.Books, "|- История России после 1991 года"); - caps.Categories.AddCategoryMapping(2453, NewznabStandardCategory.Books, "|- История стран бывшего СССР"); - caps.Categories.AddCategoryMapping(2320, NewznabStandardCategory.Books, "|- Этнография, антропология"); - caps.Categories.AddCategoryMapping(1801, NewznabStandardCategory.Books, "|- Международные отношения. Дипломатия"); - caps.Categories.AddCategoryMapping(2023, NewznabStandardCategory.BooksTechnical, "Точные, естественные и инженерные науки"); - caps.Categories.AddCategoryMapping(2024, NewznabStandardCategory.BooksTechnical, "|- Авиация / Космонавтика"); - caps.Categories.AddCategoryMapping(2026, NewznabStandardCategory.BooksTechnical, "|- Физика"); - caps.Categories.AddCategoryMapping(2192, NewznabStandardCategory.BooksTechnical, "|- Астрономия"); - caps.Categories.AddCategoryMapping(2027, NewznabStandardCategory.BooksTechnical, "|- Биология / Экология"); - caps.Categories.AddCategoryMapping(295, NewznabStandardCategory.BooksTechnical, "|- Химия / Биохимия"); - caps.Categories.AddCategoryMapping(2028, NewznabStandardCategory.BooksTechnical, "|- Математика"); - caps.Categories.AddCategoryMapping(2029, NewznabStandardCategory.BooksTechnical, "|- География / Геология / Геодезия"); - caps.Categories.AddCategoryMapping(1325, NewznabStandardCategory.BooksTechnical, "|- Электроника / Радио"); - caps.Categories.AddCategoryMapping(2386, NewznabStandardCategory.BooksTechnical, "|- Схемы и сервис-мануалы (оригинальная документация)"); - caps.Categories.AddCategoryMapping(2031, NewznabStandardCategory.BooksTechnical, "|- Архитектура / Строительство / Инженерные сети / Ландшафтный дизайн"); - caps.Categories.AddCategoryMapping(2030, NewznabStandardCategory.BooksTechnical, "|- Машиностроение"); - caps.Categories.AddCategoryMapping(2526, NewznabStandardCategory.BooksTechnical, "|- Сварка / Пайка / Неразрушающий контроль"); - caps.Categories.AddCategoryMapping(2527, NewznabStandardCategory.BooksTechnical, "|- Автоматизация / Робототехника"); - caps.Categories.AddCategoryMapping(2254, NewznabStandardCategory.BooksTechnical, "|- Металлургия / Материаловедение"); - caps.Categories.AddCategoryMapping(2376, NewznabStandardCategory.BooksTechnical, "|- Механика, сопротивление материалов"); - caps.Categories.AddCategoryMapping(2054, NewznabStandardCategory.BooksTechnical, "|- Энергетика / электротехника"); - caps.Categories.AddCategoryMapping(770, NewznabStandardCategory.BooksTechnical, "|- Нефтяная, газовая и химическая промышленность"); - caps.Categories.AddCategoryMapping(2476, NewznabStandardCategory.BooksTechnical, "|- Сельское хозяйство и пищевая промышленность"); - caps.Categories.AddCategoryMapping(2494, NewznabStandardCategory.BooksTechnical, "|- Железнодорожное дело"); - caps.Categories.AddCategoryMapping(1528, NewznabStandardCategory.BooksTechnical, "|- Нормативная документация"); - caps.Categories.AddCategoryMapping(2032, NewznabStandardCategory.BooksTechnical, "|- Журналы: научные, научно-популярные, радио и др."); - caps.Categories.AddCategoryMapping(919, NewznabStandardCategory.Books, "Ноты и Музыкальная литература"); - caps.Categories.AddCategoryMapping(944, NewznabStandardCategory.Books, "|- Академическая музыка (Ноты и Media CD)"); - caps.Categories.AddCategoryMapping(980, NewznabStandardCategory.Books, "|- Другие направления (Ноты, табулатуры)"); - caps.Categories.AddCategoryMapping(946, NewznabStandardCategory.Books, "|- Самоучители и Школы"); - caps.Categories.AddCategoryMapping(977, NewznabStandardCategory.Books, "|- Песенники (Songbooks)"); - caps.Categories.AddCategoryMapping(2074, NewznabStandardCategory.Books, "|- Музыкальная литература и Теория"); - caps.Categories.AddCategoryMapping(2349, NewznabStandardCategory.Books, "|- Музыкальные журналы"); - caps.Categories.AddCategoryMapping(768, NewznabStandardCategory.Books, "Военное дело"); - caps.Categories.AddCategoryMapping(2099, NewznabStandardCategory.Books, "|- Милитария"); - caps.Categories.AddCategoryMapping(2021, NewznabStandardCategory.Books, "|- Военная история"); - caps.Categories.AddCategoryMapping(2437, NewznabStandardCategory.Books, "|- История Второй мировой войны"); - caps.Categories.AddCategoryMapping(1337, NewznabStandardCategory.Books, "|- Биографии и мемуары военных деятелей"); - caps.Categories.AddCategoryMapping(1447, NewznabStandardCategory.Books, "|- Военная техника"); - caps.Categories.AddCategoryMapping(2468, NewznabStandardCategory.Books, "|- Стрелковое оружие"); - caps.Categories.AddCategoryMapping(2469, NewznabStandardCategory.Books, "|- Учебно-методическая литература"); - caps.Categories.AddCategoryMapping(2470, NewznabStandardCategory.Books, "|- Спецслужбы мира"); - caps.Categories.AddCategoryMapping(1686, NewznabStandardCategory.Books, "Вера и религия"); - caps.Categories.AddCategoryMapping(2215, NewznabStandardCategory.Books, "|- Христианство"); - caps.Categories.AddCategoryMapping(2216, NewznabStandardCategory.Books, "|- Ислам"); - caps.Categories.AddCategoryMapping(2217, NewznabStandardCategory.Books, "|- Религии Индии, Тибета и Восточной Азии / Иудаизм"); - caps.Categories.AddCategoryMapping(2218, NewznabStandardCategory.Books, "|- Нетрадиционные религиозные, духовные и мистические учения"); - caps.Categories.AddCategoryMapping(2252, NewznabStandardCategory.Books, "|- Религиоведение. История Религии"); - caps.Categories.AddCategoryMapping(2543, NewznabStandardCategory.Books, "|- Атеизм. Научный атеизм"); - caps.Categories.AddCategoryMapping(767, NewznabStandardCategory.Books, "Психология"); - caps.Categories.AddCategoryMapping(2515, NewznabStandardCategory.Books, "|- Общая и прикладная психология"); - caps.Categories.AddCategoryMapping(2516, NewznabStandardCategory.Books, "|- Психотерапия и консультирование"); - caps.Categories.AddCategoryMapping(2517, NewznabStandardCategory.Books, "|- Психодиагностика и психокоррекция"); - caps.Categories.AddCategoryMapping(2518, NewznabStandardCategory.Books, "|- Социальная психология и психология отношений"); - caps.Categories.AddCategoryMapping(2519, NewznabStandardCategory.Books, "|- Тренинг и коучинг"); - caps.Categories.AddCategoryMapping(2520, NewznabStandardCategory.Books, "|- Саморазвитие и самосовершенствование"); - caps.Categories.AddCategoryMapping(1696, NewznabStandardCategory.Books, "|- Популярная психология"); - caps.Categories.AddCategoryMapping(2253, NewznabStandardCategory.Books, "|- Сексология. Взаимоотношения полов (18+)"); - caps.Categories.AddCategoryMapping(2033, NewznabStandardCategory.Books, "Коллекционирование, увлечения и хобби"); - caps.Categories.AddCategoryMapping(1412, NewznabStandardCategory.Books, "|- Коллекционирование и вспомогательные ист. дисциплины"); - caps.Categories.AddCategoryMapping(1446, NewznabStandardCategory.Books, "|- Вышивание"); - caps.Categories.AddCategoryMapping(753, NewznabStandardCategory.Books, "|- Вязание"); - caps.Categories.AddCategoryMapping(2037, NewznabStandardCategory.Books, "|- Шитье, пэчворк"); - caps.Categories.AddCategoryMapping(2224, NewznabStandardCategory.Books, "|- Кружевоплетение"); - caps.Categories.AddCategoryMapping(2194, NewznabStandardCategory.Books, "|- Бисероплетение. Ювелирика. Украшения из проволоки."); - caps.Categories.AddCategoryMapping(2418, NewznabStandardCategory.Books, "|- Бумажный арт"); - caps.Categories.AddCategoryMapping(1410, NewznabStandardCategory.Books, "|- Другие виды декоративно-прикладного искусства"); - caps.Categories.AddCategoryMapping(2034, NewznabStandardCategory.Books, "|- Домашние питомцы и аквариумистика"); - caps.Categories.AddCategoryMapping(2433, NewznabStandardCategory.Books, "|- Охота и рыбалка"); - caps.Categories.AddCategoryMapping(1961, NewznabStandardCategory.Books, "|- Кулинария (книги)"); - caps.Categories.AddCategoryMapping(2432, NewznabStandardCategory.Books, "|- Кулинария (газеты и журналы)"); - caps.Categories.AddCategoryMapping(565, NewznabStandardCategory.Books, "|- Моделизм"); - caps.Categories.AddCategoryMapping(1523, NewznabStandardCategory.Books, "|- Приусадебное хозяйство / Цветоводство"); - caps.Categories.AddCategoryMapping(1575, NewznabStandardCategory.Books, "|- Ремонт, частное строительство, дизайн интерьеров"); - caps.Categories.AddCategoryMapping(1520, NewznabStandardCategory.Books, "|- Деревообработка"); - caps.Categories.AddCategoryMapping(2424, NewznabStandardCategory.Books, "|- Настольные игры"); - caps.Categories.AddCategoryMapping(769, NewznabStandardCategory.Books, "|- Прочие хобби и игры"); - caps.Categories.AddCategoryMapping(2038, NewznabStandardCategory.Books, "Художественная литература"); - caps.Categories.AddCategoryMapping(2043, NewznabStandardCategory.Books, "|- Русская литература"); - caps.Categories.AddCategoryMapping(2042, NewznabStandardCategory.Books, "|- Зарубежная литература (до 1900 г.)"); - caps.Categories.AddCategoryMapping(2041, NewznabStandardCategory.Books, "|- Зарубежная литература (XX и XXI век)"); - caps.Categories.AddCategoryMapping(2044, NewznabStandardCategory.Books, "|- Детектив, боевик"); - caps.Categories.AddCategoryMapping(2039, NewznabStandardCategory.Books, "|- Женский роман"); - caps.Categories.AddCategoryMapping(2045, NewznabStandardCategory.Books, "|- Отечественная фантастика / фэнтези / мистика"); - caps.Categories.AddCategoryMapping(2080, NewznabStandardCategory.Books, "|- Зарубежная фантастика / фэнтези / мистика"); - caps.Categories.AddCategoryMapping(2047, NewznabStandardCategory.Books, "|- Приключения"); - caps.Categories.AddCategoryMapping(2193, NewznabStandardCategory.Books, "|- Литературные журналы"); - caps.Categories.AddCategoryMapping(1037, NewznabStandardCategory.Books, "|- Самиздат и книги, изданные за счет авторов"); - caps.Categories.AddCategoryMapping(1418, NewznabStandardCategory.BooksTechnical, "Компьютерная литература"); - caps.Categories.AddCategoryMapping(1422, NewznabStandardCategory.BooksTechnical, "|- Программы от Microsoft"); - caps.Categories.AddCategoryMapping(1423, NewznabStandardCategory.BooksTechnical, "|- Другие программы"); - caps.Categories.AddCategoryMapping(1424, NewznabStandardCategory.BooksTechnical, "|- Mac OS; Linux, FreeBSD и прочие *NIX"); - caps.Categories.AddCategoryMapping(1445, NewznabStandardCategory.BooksTechnical, "|- СУБД"); - caps.Categories.AddCategoryMapping(1425, NewznabStandardCategory.BooksTechnical, "|- Веб-дизайн и программирование"); - caps.Categories.AddCategoryMapping(1426, NewznabStandardCategory.BooksTechnical, "|- Программирование (книги)"); - caps.Categories.AddCategoryMapping(1428, NewznabStandardCategory.BooksTechnical, "|- Графика, обработка видео"); - caps.Categories.AddCategoryMapping(1429, NewznabStandardCategory.BooksTechnical, "|- Сети / VoIP"); - caps.Categories.AddCategoryMapping(1430, NewznabStandardCategory.BooksTechnical, "|- Хакинг и безопасность"); - caps.Categories.AddCategoryMapping(1431, NewznabStandardCategory.BooksTechnical, "|- Железо (книги о ПК)"); - caps.Categories.AddCategoryMapping(1433, NewznabStandardCategory.BooksTechnical, "|- Инженерные и научные программы (книги)"); - caps.Categories.AddCategoryMapping(1432, NewznabStandardCategory.BooksTechnical, "|- Компьютерные журналы и приложения к ним"); - caps.Categories.AddCategoryMapping(2202, NewznabStandardCategory.BooksTechnical, "|- Дисковые приложения к игровым журналам"); - caps.Categories.AddCategoryMapping(862, NewznabStandardCategory.BooksComics, "Комиксы, манга, ранобэ"); - caps.Categories.AddCategoryMapping(2461, NewznabStandardCategory.BooksComics, "|- Комиксы на русском языке"); - caps.Categories.AddCategoryMapping(2462, NewznabStandardCategory.BooksComics, "|- Комиксы издательства Marvel"); - caps.Categories.AddCategoryMapping(2463, NewznabStandardCategory.BooksComics, "|- Комиксы издательства DC"); - caps.Categories.AddCategoryMapping(2464, NewznabStandardCategory.BooksComics, "|- Комиксы других издательств"); - caps.Categories.AddCategoryMapping(2473, NewznabStandardCategory.BooksComics, "|- Комиксы на других языках"); - caps.Categories.AddCategoryMapping(281, NewznabStandardCategory.BooksComics, "|- Манга (на русском языке)"); - caps.Categories.AddCategoryMapping(2465, NewznabStandardCategory.BooksComics, "|- Манга (на иностранных языках)"); - caps.Categories.AddCategoryMapping(2458, NewznabStandardCategory.BooksComics, "|- Ранобэ"); - caps.Categories.AddCategoryMapping(2048, NewznabStandardCategory.BooksOther, "Коллекции книг и библиотеки"); - caps.Categories.AddCategoryMapping(1238, NewznabStandardCategory.BooksOther, "|- Библиотеки (зеркала сетевых библиотек/коллекций)"); - caps.Categories.AddCategoryMapping(2055, NewznabStandardCategory.BooksOther, "|- Тематические коллекции (подборки)"); - caps.Categories.AddCategoryMapping(754, NewznabStandardCategory.BooksOther, "|- Многопредметные коллекции (подборки)"); - caps.Categories.AddCategoryMapping(2114, NewznabStandardCategory.BooksEBook, "Мультимедийные и интерактивные издания"); - caps.Categories.AddCategoryMapping(2438, NewznabStandardCategory.BooksEBook, "|- Мультимедийные энциклопедии"); - caps.Categories.AddCategoryMapping(2439, NewznabStandardCategory.BooksEBook, "|- Интерактивные обучающие и развивающие материалы"); - caps.Categories.AddCategoryMapping(2440, NewznabStandardCategory.BooksEBook, "|- Обучающие издания для детей"); - caps.Categories.AddCategoryMapping(2441, NewznabStandardCategory.BooksEBook, "|- Кулинария. Цветоводство. Домоводство"); - caps.Categories.AddCategoryMapping(2442, NewznabStandardCategory.BooksEBook, "|- Культура. Искусство. История"); - caps.Categories.AddCategoryMapping(2125, NewznabStandardCategory.Books, "Медицина и здоровье"); - caps.Categories.AddCategoryMapping(2133, NewznabStandardCategory.Books, "|- Клиническая медицина до 1980 г."); - caps.Categories.AddCategoryMapping(2130, NewznabStandardCategory.Books, "|- Клиническая медицина с 1980 по 2000 г."); - caps.Categories.AddCategoryMapping(2313, NewznabStandardCategory.Books, "|- Клиническая медицина после 2000 г."); - caps.Categories.AddCategoryMapping(2528, NewznabStandardCategory.Books, "|- Научная медицинская периодика (газеты и журналы)"); - caps.Categories.AddCategoryMapping(2129, NewznabStandardCategory.Books, "|- Медико-биологические науки"); - caps.Categories.AddCategoryMapping(2141, NewznabStandardCategory.Books, "|- Фармация и фармакология"); - caps.Categories.AddCategoryMapping(2314, NewznabStandardCategory.Books, "|- Популярная медицинская периодика (газеты и журналы)"); - caps.Categories.AddCategoryMapping(2132, NewznabStandardCategory.Books, "|- Нетрадиционная, народная медицина и популярные книги о здоровье"); - caps.Categories.AddCategoryMapping(2131, NewznabStandardCategory.Books, "|- Ветеринария, разное"); - caps.Categories.AddCategoryMapping(2315, NewznabStandardCategory.Books, "|- Тематические коллекции книг"); - caps.Categories.AddCategoryMapping(2362, NewznabStandardCategory.BooksEBook, "Иностранные языки для взрослых"); - caps.Categories.AddCategoryMapping(1265, NewznabStandardCategory.BooksEBook, "|- Английский язык (для взрослых)"); - caps.Categories.AddCategoryMapping(1266, NewznabStandardCategory.BooksEBook, "|- Немецкий язык"); - caps.Categories.AddCategoryMapping(1267, NewznabStandardCategory.BooksEBook, "|- Французский язык"); - caps.Categories.AddCategoryMapping(1358, NewznabStandardCategory.BooksEBook, "|- Испанский язык"); - caps.Categories.AddCategoryMapping(2363, NewznabStandardCategory.BooksEBook, "|- Итальянский язык"); - caps.Categories.AddCategoryMapping(734, NewznabStandardCategory.BooksEBook, "|- Финский язык"); - caps.Categories.AddCategoryMapping(1268, NewznabStandardCategory.BooksEBook, "|- Другие европейские языки"); - caps.Categories.AddCategoryMapping(1673, NewznabStandardCategory.BooksEBook, "|- Арабский язык"); - caps.Categories.AddCategoryMapping(1269, NewznabStandardCategory.BooksEBook, "|- Китайский язык"); - caps.Categories.AddCategoryMapping(1270, NewznabStandardCategory.BooksEBook, "|- Японский язык"); - caps.Categories.AddCategoryMapping(1275, NewznabStandardCategory.BooksEBook, "|- Другие восточные языки"); - caps.Categories.AddCategoryMapping(2364, NewznabStandardCategory.BooksEBook, "|- Русский язык как иностранный"); - caps.Categories.AddCategoryMapping(1276, NewznabStandardCategory.BooksEBook, "|- Мультиязычные сборники и курсы"); - caps.Categories.AddCategoryMapping(2094, NewznabStandardCategory.BooksEBook, "|- LIM-курсы"); - caps.Categories.AddCategoryMapping(1274, NewznabStandardCategory.BooksEBook, "|- Разное (иностранные языки)"); - caps.Categories.AddCategoryMapping(1264, NewznabStandardCategory.BooksEBook, "Иностранные языки для детей"); - caps.Categories.AddCategoryMapping(2358, NewznabStandardCategory.BooksEBook, "|- Английский язык (для детей)"); - caps.Categories.AddCategoryMapping(2359, NewznabStandardCategory.BooksEBook, "|- Другие европейские языки (для детей)"); - caps.Categories.AddCategoryMapping(2360, NewznabStandardCategory.BooksEBook, "|- Восточные языки (для детей)"); - caps.Categories.AddCategoryMapping(2361, NewznabStandardCategory.BooksEBook, "|- Школьные учебники, ЕГЭ, ОГЭ"); - caps.Categories.AddCategoryMapping(2057, NewznabStandardCategory.BooksEBook, "Художественная литература (ин.языки)"); - caps.Categories.AddCategoryMapping(2355, NewznabStandardCategory.BooksEBook, "|- Художественная литература на английском языке"); - caps.Categories.AddCategoryMapping(2474, NewznabStandardCategory.BooksEBook, "|- Художественная литература на французском языке"); - caps.Categories.AddCategoryMapping(2356, NewznabStandardCategory.BooksEBook, "|- Художественная литература на других европейских языках"); - caps.Categories.AddCategoryMapping(2357, NewznabStandardCategory.BooksEBook, "|- Художественная литература на восточных языках"); - caps.Categories.AddCategoryMapping(2413, NewznabStandardCategory.AudioAudiobook, "Аудиокниги на иностранных языках"); - caps.Categories.AddCategoryMapping(1501, NewznabStandardCategory.AudioAudiobook, "|- Аудиокниги на английском языке"); - caps.Categories.AddCategoryMapping(1580, NewznabStandardCategory.AudioAudiobook, "|- Аудиокниги на немецком языке"); - caps.Categories.AddCategoryMapping(525, NewznabStandardCategory.AudioAudiobook, "|- Аудиокниги на других иностранных языках"); - caps.Categories.AddCategoryMapping(610, NewznabStandardCategory.BooksOther, "Видеоуроки и обучающие интерактивные DVD"); - caps.Categories.AddCategoryMapping(1568, NewznabStandardCategory.BooksOther, "|- Кулинария"); - caps.Categories.AddCategoryMapping(1542, NewznabStandardCategory.BooksOther, "|- Спорт"); - caps.Categories.AddCategoryMapping(2335, NewznabStandardCategory.BooksOther, "|- Фитнес - Кардио-Силовые Тренировки"); - caps.Categories.AddCategoryMapping(1544, NewznabStandardCategory.BooksOther, "|- Фитнес - Разум и Тело"); - caps.Categories.AddCategoryMapping(1546, NewznabStandardCategory.BooksOther, "|- Бодибилдинг"); - caps.Categories.AddCategoryMapping(1549, NewznabStandardCategory.BooksOther, "|- Оздоровительные практики"); - caps.Categories.AddCategoryMapping(1597, NewznabStandardCategory.BooksOther, "|- Йога"); - caps.Categories.AddCategoryMapping(1552, NewznabStandardCategory.BooksOther, "|- Видео- и фотосъёмка"); - caps.Categories.AddCategoryMapping(1550, NewznabStandardCategory.BooksOther, "|- Уход за собой"); - caps.Categories.AddCategoryMapping(1553, NewznabStandardCategory.BooksOther, "|- Рисование"); - caps.Categories.AddCategoryMapping(1554, NewznabStandardCategory.BooksOther, "|- Игра на гитаре"); - caps.Categories.AddCategoryMapping(617, NewznabStandardCategory.BooksOther, "|- Ударные инструменты"); - caps.Categories.AddCategoryMapping(1555, NewznabStandardCategory.BooksOther, "|- Другие музыкальные инструменты"); - caps.Categories.AddCategoryMapping(2017, NewznabStandardCategory.BooksOther, "|- Игра на бас-гитаре"); - caps.Categories.AddCategoryMapping(1257, NewznabStandardCategory.BooksOther, "|- Бальные танцы"); - caps.Categories.AddCategoryMapping(1258, NewznabStandardCategory.BooksOther, "|- Танец живота"); - caps.Categories.AddCategoryMapping(2208, NewznabStandardCategory.BooksOther, "|- Уличные и клубные танцы"); - caps.Categories.AddCategoryMapping(677, NewznabStandardCategory.BooksOther, "|- Танцы, разное"); - caps.Categories.AddCategoryMapping(1255, NewznabStandardCategory.BooksOther, "|- Охота"); - caps.Categories.AddCategoryMapping(1479, NewznabStandardCategory.BooksOther, "|- Рыболовство и подводная охота"); - caps.Categories.AddCategoryMapping(1261, NewznabStandardCategory.BooksOther, "|- Фокусы и трюки"); - caps.Categories.AddCategoryMapping(614, NewznabStandardCategory.BooksOther, "|- Образование"); - caps.Categories.AddCategoryMapping(1583, NewznabStandardCategory.BooksOther, "|- Финансы"); - caps.Categories.AddCategoryMapping(1259, NewznabStandardCategory.BooksOther, "|- Продажи, бизнес"); - caps.Categories.AddCategoryMapping(2065, NewznabStandardCategory.BooksOther, "|- Беременность, роды, материнство"); - caps.Categories.AddCategoryMapping(1254, NewznabStandardCategory.BooksOther, "|- Учебные видео для детей"); - caps.Categories.AddCategoryMapping(1260, NewznabStandardCategory.BooksOther, "|- Психология"); - caps.Categories.AddCategoryMapping(2209, NewznabStandardCategory.BooksOther, "|- Эзотерика, саморазвитие"); - caps.Categories.AddCategoryMapping(2210, NewznabStandardCategory.BooksOther, "|- Пикап, знакомства"); - caps.Categories.AddCategoryMapping(1547, NewznabStandardCategory.BooksOther, "|- Строительство, ремонт и дизайн"); - caps.Categories.AddCategoryMapping(1548, NewznabStandardCategory.BooksOther, "|- Дерево- и металлообработка"); - caps.Categories.AddCategoryMapping(2211, NewznabStandardCategory.BooksOther, "|- Растения и животные"); - caps.Categories.AddCategoryMapping(1596, NewznabStandardCategory.BooksOther, "|- Хобби и рукоделие"); - caps.Categories.AddCategoryMapping(2135, NewznabStandardCategory.BooksOther, "|- Медицина и стоматология"); - caps.Categories.AddCategoryMapping(2140, NewznabStandardCategory.BooksOther, "|- Психотерапия и клиническая психология"); - caps.Categories.AddCategoryMapping(2136, NewznabStandardCategory.BooksOther, "|- Массаж"); - caps.Categories.AddCategoryMapping(2138, NewznabStandardCategory.BooksOther, "|- Здоровье"); - caps.Categories.AddCategoryMapping(615, NewznabStandardCategory.BooksOther, "|- Разное"); - caps.Categories.AddCategoryMapping(1581, NewznabStandardCategory.BooksOther, "Боевые искусства (Видеоуроки)"); - caps.Categories.AddCategoryMapping(1590, NewznabStandardCategory.BooksOther, "|- Айкидо и айки-дзюцу"); - caps.Categories.AddCategoryMapping(1587, NewznabStandardCategory.BooksOther, "|- Вин чун"); - caps.Categories.AddCategoryMapping(1594, NewznabStandardCategory.BooksOther, "|- Джиу-джитсу"); - caps.Categories.AddCategoryMapping(1591, NewznabStandardCategory.BooksOther, "|- Дзюдо и самбо"); - caps.Categories.AddCategoryMapping(1588, NewznabStandardCategory.BooksOther, "|- Каратэ"); - caps.Categories.AddCategoryMapping(1585, NewznabStandardCategory.BooksOther, "|- Работа с оружием"); - caps.Categories.AddCategoryMapping(1586, NewznabStandardCategory.BooksOther, "|- Русский стиль"); - caps.Categories.AddCategoryMapping(2078, NewznabStandardCategory.BooksOther, "|- Рукопашный бой"); - caps.Categories.AddCategoryMapping(1929, NewznabStandardCategory.BooksOther, "|- Смешанные стили"); - caps.Categories.AddCategoryMapping(1593, NewznabStandardCategory.BooksOther, "|- Ударные стили"); - caps.Categories.AddCategoryMapping(1592, NewznabStandardCategory.BooksOther, "|- Ушу"); - caps.Categories.AddCategoryMapping(1595, NewznabStandardCategory.BooksOther, "|- Разное"); - caps.Categories.AddCategoryMapping(1556, NewznabStandardCategory.BooksTechnical, "Компьютерные видеоуроки и обучающие интерактивные DVD"); - caps.Categories.AddCategoryMapping(1560, NewznabStandardCategory.BooksTechnical, "|- Компьютерные сети и безопасность"); - caps.Categories.AddCategoryMapping(1991, NewznabStandardCategory.BooksTechnical, "|- Devops"); - caps.Categories.AddCategoryMapping(1561, NewznabStandardCategory.BooksTechnical, "|- ОС и серверные программы Microsoft"); - caps.Categories.AddCategoryMapping(1653, NewznabStandardCategory.BooksTechnical, "|- Офисные программы Microsoft"); - caps.Categories.AddCategoryMapping(1570, NewznabStandardCategory.BooksTechnical, "|- ОС и программы семейства UNIX"); - caps.Categories.AddCategoryMapping(1654, NewznabStandardCategory.BooksTechnical, "|- Adobe Photoshop"); - caps.Categories.AddCategoryMapping(1655, NewznabStandardCategory.BooksTechnical, "|- Autodesk Maya"); - caps.Categories.AddCategoryMapping(1656, NewznabStandardCategory.BooksTechnical, "|- Autodesk 3ds Max"); - caps.Categories.AddCategoryMapping(1930, NewznabStandardCategory.BooksTechnical, "|- Autodesk Softimage (XSI)"); - caps.Categories.AddCategoryMapping(1931, NewznabStandardCategory.BooksTechnical, "|- ZBrush"); - caps.Categories.AddCategoryMapping(1932, NewznabStandardCategory.BooksTechnical, "|- Flash, Flex и ActionScript"); - caps.Categories.AddCategoryMapping(1562, NewznabStandardCategory.BooksTechnical, "|- 2D-графика"); - caps.Categories.AddCategoryMapping(1563, NewznabStandardCategory.BooksTechnical, "|- 3D-графика"); - caps.Categories.AddCategoryMapping(1626, NewznabStandardCategory.BooksTechnical, "|- Инженерные и научные программы (видеоуроки)"); - caps.Categories.AddCategoryMapping(1564, NewznabStandardCategory.BooksTechnical, "|- Web-дизайн"); - caps.Categories.AddCategoryMapping(1545, NewznabStandardCategory.BooksTechnical, "|- WEB, SMM, SEO, интернет-маркетинг"); - caps.Categories.AddCategoryMapping(1565, NewznabStandardCategory.BooksTechnical, "|- Программирование (видеоуроки)"); - caps.Categories.AddCategoryMapping(1559, NewznabStandardCategory.BooksTechnical, "|- Программы для Mac OS"); - caps.Categories.AddCategoryMapping(1566, NewznabStandardCategory.BooksTechnical, "|- Работа с видео"); - caps.Categories.AddCategoryMapping(1573, NewznabStandardCategory.BooksTechnical, "|- Работа со звуком"); - caps.Categories.AddCategoryMapping(1567, NewznabStandardCategory.BooksTechnical, "|- Разное (Компьютерные видеоуроки)"); - caps.Categories.AddCategoryMapping(2326, NewznabStandardCategory.AudioAudiobook, "Радиоспектакли, история, мемуары"); - caps.Categories.AddCategoryMapping(574, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Радиоспектакли и литературные чтения"); - caps.Categories.AddCategoryMapping(1036, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Биографии и мемуары"); - caps.Categories.AddCategoryMapping(400, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] История, культурология, философия"); - caps.Categories.AddCategoryMapping(2389, NewznabStandardCategory.AudioAudiobook, "Фантастика, фэнтези, мистика, ужасы, фанфики"); - caps.Categories.AddCategoryMapping(2388, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Зарубежная фантастика, фэнтези, мистика, ужасы, фанфики"); - caps.Categories.AddCategoryMapping(2387, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Российская фантастика, фэнтези, мистика, ужасы, фанфики"); - caps.Categories.AddCategoryMapping(661, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Любовно-фантастический роман"); - caps.Categories.AddCategoryMapping(2348, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Сборники/разное Фантастика, фэнтези, мистика, ужасы, фанфики"); - caps.Categories.AddCategoryMapping(2327, NewznabStandardCategory.AudioAudiobook, "Художественная литература"); - caps.Categories.AddCategoryMapping(695, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Поэзия"); - caps.Categories.AddCategoryMapping(399, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Зарубежная литература"); - caps.Categories.AddCategoryMapping(402, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Русская литература"); - caps.Categories.AddCategoryMapping(467, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Современные любовные романы"); - caps.Categories.AddCategoryMapping(490, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Детская литература"); - caps.Categories.AddCategoryMapping(499, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Зарубежные детективы, приключения, триллеры, боевики"); - caps.Categories.AddCategoryMapping(2137, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Российские детективы, приключения, триллеры, боевики"); - caps.Categories.AddCategoryMapping(2127, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Азиатская подростковая литература, ранобэ, веб-новеллы"); - caps.Categories.AddCategoryMapping(2324, NewznabStandardCategory.AudioAudiobook, "Религии"); - caps.Categories.AddCategoryMapping(2325, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Православие"); - caps.Categories.AddCategoryMapping(2342, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Ислам"); - caps.Categories.AddCategoryMapping(530, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Другие традиционные религии"); - caps.Categories.AddCategoryMapping(2152, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Нетрадиционные религиозно-философские учения"); - caps.Categories.AddCategoryMapping(2328, NewznabStandardCategory.AudioAudiobook, "Прочая литература"); - caps.Categories.AddCategoryMapping(1350, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Книги по медицине"); - caps.Categories.AddCategoryMapping(403, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Учебная и научно-популярная литература"); - caps.Categories.AddCategoryMapping(1279, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] lossless-аудиокниги"); - caps.Categories.AddCategoryMapping(716, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Бизнес"); - caps.Categories.AddCategoryMapping(2165, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Разное"); - caps.Categories.AddCategoryMapping(401, NewznabStandardCategory.AudioAudiobook, "|- [Аудио] Некондиционные раздачи"); - caps.Categories.AddCategoryMapping(1964, NewznabStandardCategory.Books, "Ремонт и эксплуатация транспортных средств"); - caps.Categories.AddCategoryMapping(1973, NewznabStandardCategory.Books, "|- Оригинальные каталоги по подбору запчастей"); - caps.Categories.AddCategoryMapping(1974, NewznabStandardCategory.Books, "|- Неоригинальные каталоги по подбору запчастей"); - caps.Categories.AddCategoryMapping(1975, NewznabStandardCategory.Books, "|- Программы по диагностике и ремонту"); - caps.Categories.AddCategoryMapping(1976, NewznabStandardCategory.Books, "|- Тюнинг, чиптюнинг, настройка"); - caps.Categories.AddCategoryMapping(1977, NewznabStandardCategory.Books, "|- Книги по ремонту/обслуживанию/эксплуатации ТС"); - caps.Categories.AddCategoryMapping(1203, NewznabStandardCategory.Books, "|- Мультимедийки по ремонту/обслуживанию/эксплуатации ТС"); - caps.Categories.AddCategoryMapping(1978, NewznabStandardCategory.Books, "|- Учет, утилиты и прочее"); - caps.Categories.AddCategoryMapping(1979, NewznabStandardCategory.Books, "|- Виртуальная автошкола"); - caps.Categories.AddCategoryMapping(1980, NewznabStandardCategory.Books, "|- Видеоуроки по вождению транспортных средств"); - caps.Categories.AddCategoryMapping(1981, NewznabStandardCategory.Books, "|- Видеоуроки по ремонту транспортных средств"); - caps.Categories.AddCategoryMapping(1970, NewznabStandardCategory.Books, "|- Журналы по авто/мото"); - caps.Categories.AddCategoryMapping(334, NewznabStandardCategory.Books, "|- Водный транспорт"); - caps.Categories.AddCategoryMapping(1202, NewznabStandardCategory.TVDocumentary, "Фильмы и передачи по авто/мото"); - caps.Categories.AddCategoryMapping(1985, NewznabStandardCategory.TVDocumentary, "|- Документальные/познавательные фильмы"); - caps.Categories.AddCategoryMapping(1982, NewznabStandardCategory.TVOther, "|- Развлекательные передачи"); - caps.Categories.AddCategoryMapping(2151, NewznabStandardCategory.TVDocumentary, "|- Top Gear/Топ Гир"); - caps.Categories.AddCategoryMapping(1983, NewznabStandardCategory.TVDocumentary, "|- Тест драйв/Обзоры/Автосалоны"); - caps.Categories.AddCategoryMapping(1984, NewznabStandardCategory.TVDocumentary, "|- Тюнинг/форсаж"); - caps.Categories.AddCategoryMapping(409, NewznabStandardCategory.Audio, "Классическая и современная академическая музыка"); - caps.Categories.AddCategoryMapping(560, NewznabStandardCategory.AudioLossless, "|- Полные собрания сочинений и многодисковые издания (lossless)"); - caps.Categories.AddCategoryMapping(794, NewznabStandardCategory.AudioLossless, "|- Опера (lossless)"); - caps.Categories.AddCategoryMapping(556, NewznabStandardCategory.AudioLossless, "|- Вокальная музыка (lossless)"); - caps.Categories.AddCategoryMapping(2307, NewznabStandardCategory.AudioLossless, "|- Хоровая музыка (lossless)"); - caps.Categories.AddCategoryMapping(557, NewznabStandardCategory.AudioLossless, "|- Оркестровая музыка (lossless)"); - caps.Categories.AddCategoryMapping(2308, NewznabStandardCategory.AudioLossless, "|- Концерт для инструмента с оркестром (lossless)"); - caps.Categories.AddCategoryMapping(558, NewznabStandardCategory.AudioLossless, "|- Камерная инструментальная музыка (lossless)"); - caps.Categories.AddCategoryMapping(793, NewznabStandardCategory.AudioLossless, "|- Сольная инструментальная музыка (lossless)"); - caps.Categories.AddCategoryMapping(1395, NewznabStandardCategory.AudioLossless, "|- Духовные песнопения и музыка (lossless)"); - caps.Categories.AddCategoryMapping(1396, NewznabStandardCategory.AudioMP3, "|- Духовные песнопения и музыка (lossy)"); - caps.Categories.AddCategoryMapping(436, NewznabStandardCategory.AudioMP3, "|- Полные собрания сочинений и многодисковые издания (lossy)"); - caps.Categories.AddCategoryMapping(2309, NewznabStandardCategory.AudioMP3, "|- Вокальная и хоровая музыка (lossy)"); - caps.Categories.AddCategoryMapping(2310, NewznabStandardCategory.AudioMP3, "|- Оркестровая музыка (lossy)"); - caps.Categories.AddCategoryMapping(2311, NewznabStandardCategory.AudioMP3, "|- Камерная и сольная инструментальная музыка (lossy)"); - caps.Categories.AddCategoryMapping(969, NewznabStandardCategory.Audio, "|- Классика в современной обработке, Classical Crossover (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1125, NewznabStandardCategory.Audio, "Фольклор, Народная и Этническая музыка"); - caps.Categories.AddCategoryMapping(1130, NewznabStandardCategory.AudioMP3, "|- Восточноевропейский фолк (lossy)"); - caps.Categories.AddCategoryMapping(1131, NewznabStandardCategory.AudioLossless, "|- Восточноевропейский фолк (lossless)"); - caps.Categories.AddCategoryMapping(1132, NewznabStandardCategory.AudioMP3, "|- Западноевропейский фолк (lossy)"); - caps.Categories.AddCategoryMapping(1133, NewznabStandardCategory.AudioLossless, "|- Западноевропейский фолк (lossless)"); - caps.Categories.AddCategoryMapping(2084, NewznabStandardCategory.Audio, "|- Klezmer и Еврейский фольклор (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1128, NewznabStandardCategory.AudioMP3, "|- Этническая музыка Сибири, Средней и Восточной Азии (lossy)"); - caps.Categories.AddCategoryMapping(1129, NewznabStandardCategory.AudioLossless, "|- Этническая музыка Сибири, Средней и Восточной Азии (lossless)"); - caps.Categories.AddCategoryMapping(1856, NewznabStandardCategory.AudioMP3, "|- Этническая музыка Индии (lossy)"); - caps.Categories.AddCategoryMapping(2430, NewznabStandardCategory.AudioLossless, "|- Этническая музыка Индии (lossless)"); - caps.Categories.AddCategoryMapping(1283, NewznabStandardCategory.AudioMP3, "|- Этническая музыка Африки и Ближнего Востока (lossy)"); - caps.Categories.AddCategoryMapping(2085, NewznabStandardCategory.AudioLossless, "|- Этническая музыка Африки и Ближнего Востока (lossless)"); - caps.Categories.AddCategoryMapping(1282, NewznabStandardCategory.Audio, "|- Фольклорная, Народная, Эстрадная музыка Кавказа и Закавказья (lossless)"); - caps.Categories.AddCategoryMapping(1284, NewznabStandardCategory.AudioMP3, "|- Этническая музыка Северной и Южной Америки (lossy)"); - caps.Categories.AddCategoryMapping(1285, NewznabStandardCategory.AudioLossless, "|- Этническая музыка Северной и Южной Америки (lossless)"); - caps.Categories.AddCategoryMapping(1138, NewznabStandardCategory.Audio, "|- Этническая музыка Австралии, Тихого и Индийского океанов (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1136, NewznabStandardCategory.AudioMP3, "|- Country, Bluegrass (lossy)"); - caps.Categories.AddCategoryMapping(1137, NewznabStandardCategory.AudioLossless, "|- Country, Bluegrass (lossless)"); - caps.Categories.AddCategoryMapping(1849, NewznabStandardCategory.Audio, "New Age, Relax, Meditative & Flamenco"); - caps.Categories.AddCategoryMapping(1126, NewznabStandardCategory.AudioMP3, "|- New Age & Meditative (lossy)"); - caps.Categories.AddCategoryMapping(1127, NewznabStandardCategory.AudioLossless, "|- New Age & Meditative (lossless)"); - caps.Categories.AddCategoryMapping(1134, NewznabStandardCategory.AudioMP3, "|- Фламенко и акустическая гитара (lossy)"); - caps.Categories.AddCategoryMapping(1135, NewznabStandardCategory.AudioLossless, "|- Фламенко и акустическая гитара (lossless)"); - caps.Categories.AddCategoryMapping(2018, NewznabStandardCategory.Audio, "|- Музыка для бальных танцев (lossy и lossless)"); - caps.Categories.AddCategoryMapping(855, NewznabStandardCategory.Audio, "|- Звуки природы"); - caps.Categories.AddCategoryMapping(408, NewznabStandardCategory.Audio, "Рэп, Хип-Хоп, R'n'B"); - caps.Categories.AddCategoryMapping(441, NewznabStandardCategory.AudioMP3, "|- Отечественный Рэп, Хип-Хоп (lossy)"); - caps.Categories.AddCategoryMapping(1173, NewznabStandardCategory.AudioMP3, "|- Отечественный R'n'B (lossy)"); - caps.Categories.AddCategoryMapping(1486, NewznabStandardCategory.AudioLossless, "|- Отечественный Рэп, Хип-Хоп, R'n'B (lossless)"); - caps.Categories.AddCategoryMapping(1172, NewznabStandardCategory.AudioMP3, "|- Зарубежный R'n'B (lossy)"); - caps.Categories.AddCategoryMapping(446, NewznabStandardCategory.AudioMP3, "|- Зарубежный Рэп, Хип-Хоп (lossy)"); - caps.Categories.AddCategoryMapping(909, NewznabStandardCategory.AudioLossless, "|- Зарубежный Рэп, Хип-Хоп (lossless)"); - caps.Categories.AddCategoryMapping(1665, NewznabStandardCategory.AudioLossless, "|- Зарубежный R'n'B (lossless)"); - caps.Categories.AddCategoryMapping(1760, NewznabStandardCategory.Audio, "Reggae, Ska, Dub"); - caps.Categories.AddCategoryMapping(1764, NewznabStandardCategory.Audio, "|- Rocksteady, Early Reggae, Ska-Jazz, Trad.Ska (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1767, NewznabStandardCategory.AudioMP3, "|- 3rd Wave Ska (lossy)"); - caps.Categories.AddCategoryMapping(1769, NewznabStandardCategory.AudioMP3, "|- Ska-Punk, Ska-Core (lossy)"); - caps.Categories.AddCategoryMapping(1765, NewznabStandardCategory.AudioMP3, "|- Reggae (lossy)"); - caps.Categories.AddCategoryMapping(1771, NewznabStandardCategory.AudioMP3, "|- Dub (lossy)"); - caps.Categories.AddCategoryMapping(1770, NewznabStandardCategory.AudioMP3, "|- Dancehall, Raggamuffin (lossy)"); - caps.Categories.AddCategoryMapping(1768, NewznabStandardCategory.AudioLossless, "|- Reggae, Dancehall, Dub (lossless)"); - caps.Categories.AddCategoryMapping(1774, NewznabStandardCategory.AudioLossless, "|- Ska, Ska-Punk, Ska-Jazz (lossless)"); - caps.Categories.AddCategoryMapping(1772, NewznabStandardCategory.Audio, "|- Отечественный Reggae, Dub (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1773, NewznabStandardCategory.Audio, "|- Отечественная Ska музыка (lossy и lossless)"); - caps.Categories.AddCategoryMapping(2233, NewznabStandardCategory.Audio, "|- Reggae, Ska, Dub (компиляции) (lossy и lossless)"); - caps.Categories.AddCategoryMapping(416, NewznabStandardCategory.Audio, "Саундтреки, караоке и мюзиклы"); - caps.Categories.AddCategoryMapping(2377, NewznabStandardCategory.AudioVideo, "|- Караоке"); - caps.Categories.AddCategoryMapping(468, NewznabStandardCategory.Audio, "|- Минусовки (lossy и lossless)"); - caps.Categories.AddCategoryMapping(691, NewznabStandardCategory.AudioLossless, "|- Саундтреки к отечественным фильмам (lossless)"); - caps.Categories.AddCategoryMapping(469, NewznabStandardCategory.AudioMP3, "|- Саундтреки к отечественным фильмам (lossy)"); - caps.Categories.AddCategoryMapping(786, NewznabStandardCategory.AudioLossless, "|- Саундтреки к зарубежным фильмам (lossless)"); - caps.Categories.AddCategoryMapping(785, NewznabStandardCategory.AudioMP3, "|- Саундтреки к зарубежным фильмам (lossy)"); - caps.Categories.AddCategoryMapping(1631, NewznabStandardCategory.AudioLossless, "|- Саундтреки к сериалам (lossless)"); - caps.Categories.AddCategoryMapping(1499, NewznabStandardCategory.AudioMP3, "|- Саундтреки к сериалам (lossy)"); - caps.Categories.AddCategoryMapping(715, NewznabStandardCategory.Audio, "|- Саундтреки к мультфильмам (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1388, NewznabStandardCategory.AudioLossless, "|- Саундтреки к аниме (lossless)"); - caps.Categories.AddCategoryMapping(282, NewznabStandardCategory.AudioMP3, "|- Саундтреки к аниме (lossy)"); - caps.Categories.AddCategoryMapping(796, NewznabStandardCategory.AudioMP3, "|- Неофициальные саундтреки к фильмам и сериалам (lossy)"); - caps.Categories.AddCategoryMapping(784, NewznabStandardCategory.AudioLossless, "|- Саундтреки к играм (lossless)"); - caps.Categories.AddCategoryMapping(783, NewznabStandardCategory.AudioMP3, "|- Саундтреки к играм (lossy)"); - caps.Categories.AddCategoryMapping(2331, NewznabStandardCategory.AudioMP3, "|- Неофициальные саундтреки к играм (lossy)"); - caps.Categories.AddCategoryMapping(2431, NewznabStandardCategory.Audio, "|- Аранжировки музыки из игр (lossy и lossless)"); - caps.Categories.AddCategoryMapping(880, NewznabStandardCategory.Audio, "|- Мюзикл (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1215, NewznabStandardCategory.Audio, "Шансон, Авторская и Военная песня"); - caps.Categories.AddCategoryMapping(1220, NewznabStandardCategory.AudioLossless, "|- Отечественный шансон (lossless)"); - caps.Categories.AddCategoryMapping(1221, NewznabStandardCategory.AudioMP3, "|- Отечественный шансон (lossy)"); - caps.Categories.AddCategoryMapping(1334, NewznabStandardCategory.AudioMP3, "|- Сборники отечественного шансона (lossy)"); - caps.Categories.AddCategoryMapping(1216, NewznabStandardCategory.AudioLossless, "|- Военная песня, марши (lossless)"); - caps.Categories.AddCategoryMapping(1223, NewznabStandardCategory.AudioMP3, "|- Военная песня, марши (lossy)"); - caps.Categories.AddCategoryMapping(1224, NewznabStandardCategory.AudioLossless, "|- Авторская песня (lossless)"); - caps.Categories.AddCategoryMapping(1225, NewznabStandardCategory.AudioMP3, "|- Авторская песня (lossy)"); - caps.Categories.AddCategoryMapping(1226, NewznabStandardCategory.Audio, "|- Менестрели и ролевики (lossy и lossless)"); - caps.Categories.AddCategoryMapping(1842, NewznabStandardCategory.AudioLossless, "Label Packs (lossless)"); - caps.Categories.AddCategoryMapping(1648, NewznabStandardCategory.AudioMP3, "Label packs, Scene packs (lossy)"); - caps.Categories.AddCategoryMapping(2495, NewznabStandardCategory.Audio, "Отечественная поп-музыка"); - caps.Categories.AddCategoryMapping(424, NewznabStandardCategory.AudioMP3, "|- Популярная музыка России и стран бывшего СССР (lossy)"); - caps.Categories.AddCategoryMapping(1361, NewznabStandardCategory.AudioMP3, "|- Популярная музыка России и стран бывшего СССР (сборники) (lossy)"); - caps.Categories.AddCategoryMapping(425, NewznabStandardCategory.AudioLossless, "|- Популярная музыка России и стран бывшего СССР (lossless)"); - caps.Categories.AddCategoryMapping(1635, NewznabStandardCategory.AudioMP3, "|- Советская эстрада, ретро, романсы (lossy)"); - caps.Categories.AddCategoryMapping(1634, NewznabStandardCategory.AudioLossless, "|- Советская эстрада, ретро, романсы (lossless)"); - caps.Categories.AddCategoryMapping(2497, NewznabStandardCategory.Audio, "Зарубежная поп-музыка"); - caps.Categories.AddCategoryMapping(428, NewznabStandardCategory.AudioMP3, "|- Зарубежная поп-музыка (lossy)"); - caps.Categories.AddCategoryMapping(1362, NewznabStandardCategory.AudioMP3, "|- Зарубежная поп-музыка (сборники) (lossy)"); - caps.Categories.AddCategoryMapping(429, NewznabStandardCategory.AudioLossless, "|- Зарубежная поп-музыка (lossless)"); - caps.Categories.AddCategoryMapping(735, NewznabStandardCategory.AudioMP3, "|- Итальянская поп-музыка (lossy)"); - caps.Categories.AddCategoryMapping(1753, NewznabStandardCategory.AudioLossless, "|- Итальянская поп-музыка (lossless)"); - caps.Categories.AddCategoryMapping(2232, NewznabStandardCategory.AudioMP3, "|- Латиноамериканская поп-музыка (lossy)"); - caps.Categories.AddCategoryMapping(714, NewznabStandardCategory.AudioLossless, "|- Латиноамериканская поп-музыка (lossless)"); - caps.Categories.AddCategoryMapping(1331, NewznabStandardCategory.AudioMP3, "|- Восточноазиатская поп-музыка (lossy)"); - caps.Categories.AddCategoryMapping(1330, NewznabStandardCategory.AudioLossless, "|- Восточноазиатская поп-музыка (lossless)"); - caps.Categories.AddCategoryMapping(1219, NewznabStandardCategory.AudioMP3, "|- Зарубежный шансон (lossy)"); - caps.Categories.AddCategoryMapping(1452, NewznabStandardCategory.AudioLossless, "|- Зарубежный шансон (lossless)"); - caps.Categories.AddCategoryMapping(2275, NewznabStandardCategory.AudioMP3, "|- Easy Listening, Instrumental Pop (lossy)"); - caps.Categories.AddCategoryMapping(2270, NewznabStandardCategory.AudioLossless, "|- Easy Listening, Instrumental Pop (lossless)"); - caps.Categories.AddCategoryMapping(1351, NewznabStandardCategory.Audio, "|- Сборники песен для детей (lossy и lossless)"); - caps.Categories.AddCategoryMapping(2499, NewznabStandardCategory.Audio, "Eurodance, Disco, Hi-NRG"); - caps.Categories.AddCategoryMapping(2503, NewznabStandardCategory.AudioMP3, "|- Eurodance, Euro-House, Technopop (lossy)"); - caps.Categories.AddCategoryMapping(2504, NewznabStandardCategory.AudioMP3, "|- Eurodance, Euro-House, Technopop (сборники) (lossy)"); - caps.Categories.AddCategoryMapping(2502, NewznabStandardCategory.AudioLossless, "|- Eurodance, Euro-House, Technopop (lossless)"); - caps.Categories.AddCategoryMapping(2501, NewznabStandardCategory.AudioMP3, "|- Disco, Italo-Disco, Euro-Disco, Hi-NRG (lossy)"); - caps.Categories.AddCategoryMapping(2505, NewznabStandardCategory.AudioMP3, "|- Disco, Italo-Disco, Euro-Disco, Hi-NRG (сборники) (lossy)"); - caps.Categories.AddCategoryMapping(2500, NewznabStandardCategory.AudioLossless, "|- Disco, Italo-Disco, Euro-Disco, Hi-NRG (lossless)"); - caps.Categories.AddCategoryMapping(2267, NewznabStandardCategory.Audio, "Зарубежный джаз"); - caps.Categories.AddCategoryMapping(2277, NewznabStandardCategory.AudioLossless, "|- Early Jazz, Swing, Gypsy (lossless)"); - caps.Categories.AddCategoryMapping(2278, NewznabStandardCategory.AudioLossless, "|- Bop (lossless)"); - caps.Categories.AddCategoryMapping(2279, NewznabStandardCategory.AudioLossless, "|- Mainstream Jazz, Cool (lossless)"); - caps.Categories.AddCategoryMapping(2280, NewznabStandardCategory.AudioLossless, "|- Jazz Fusion (lossless)"); - caps.Categories.AddCategoryMapping(2281, NewznabStandardCategory.AudioLossless, "|- World Fusion, Ethnic Jazz (lossless)"); - caps.Categories.AddCategoryMapping(2282, NewznabStandardCategory.AudioLossless, "|- Avant-Garde Jazz, Free Improvisation (lossless)"); - caps.Categories.AddCategoryMapping(2353, NewznabStandardCategory.AudioLossless, "|- Modern Creative, Third Stream (lossless)"); - caps.Categories.AddCategoryMapping(2284, NewznabStandardCategory.AudioLossless, "|- Smooth, Jazz-Pop (lossless)"); - caps.Categories.AddCategoryMapping(2285, NewznabStandardCategory.AudioLossless, "|- Vocal Jazz (lossless)"); - caps.Categories.AddCategoryMapping(2283, NewznabStandardCategory.AudioLossless, "|- Funk, Soul, R&B (lossless)"); - caps.Categories.AddCategoryMapping(2286, NewznabStandardCategory.AudioLossless, "|- Сборники зарубежного джаза (lossless)"); - caps.Categories.AddCategoryMapping(2287, NewznabStandardCategory.AudioMP3, "|- Зарубежный джаз (lossy)"); - caps.Categories.AddCategoryMapping(2268, NewznabStandardCategory.Audio, "Зарубежный блюз"); - caps.Categories.AddCategoryMapping(2293, NewznabStandardCategory.AudioLossless, "|- Blues (Texas, Chicago, Modern and Others) (lossless)"); - caps.Categories.AddCategoryMapping(2292, NewznabStandardCategory.AudioLossless, "|- Blues-rock (lossless)"); - caps.Categories.AddCategoryMapping(2290, NewznabStandardCategory.AudioLossless, "|- Roots, Pre-War Blues, Early R&B, Gospel (lossless)"); - caps.Categories.AddCategoryMapping(2289, NewznabStandardCategory.AudioLossless, "|- Зарубежный блюз (сборники; Tribute VA) (lossless)"); - caps.Categories.AddCategoryMapping(2288, NewznabStandardCategory.AudioMP3, "|- Зарубежный блюз (lossy)"); - caps.Categories.AddCategoryMapping(2269, NewznabStandardCategory.Audio, "Отечественный джаз и блюз"); - caps.Categories.AddCategoryMapping(2297, NewznabStandardCategory.AudioLossless, "|- Отечественный джаз (lossless)"); - caps.Categories.AddCategoryMapping(2295, NewznabStandardCategory.AudioMP3, "|- Отечественный джаз (lossy)"); - caps.Categories.AddCategoryMapping(2296, NewznabStandardCategory.AudioLossless, "|- Отечественный блюз (lossless)"); - caps.Categories.AddCategoryMapping(2298, NewznabStandardCategory.AudioMP3, "|- Отечественный блюз (lossy)"); - caps.Categories.AddCategoryMapping(1698, NewznabStandardCategory.Audio, "Зарубежный Rock"); - caps.Categories.AddCategoryMapping(1702, NewznabStandardCategory.AudioLossless, "|- Classic Rock & Hard Rock (lossless)"); - caps.Categories.AddCategoryMapping(1703, NewznabStandardCategory.AudioMP3, "|- Classic Rock & Hard Rock (lossy)"); - caps.Categories.AddCategoryMapping(1704, NewznabStandardCategory.AudioLossless, "|- Progressive & Art-Rock (lossless)"); - caps.Categories.AddCategoryMapping(1705, NewznabStandardCategory.AudioMP3, "|- Progressive & Art-Rock (lossy)"); - caps.Categories.AddCategoryMapping(1706, NewznabStandardCategory.AudioLossless, "|- Folk-Rock (lossless)"); - caps.Categories.AddCategoryMapping(1707, NewznabStandardCategory.AudioMP3, "|- Folk-Rock (lossy)"); - caps.Categories.AddCategoryMapping(2329, NewznabStandardCategory.AudioLossless, "|- AOR (Melodic Hard Rock, Arena rock) (lossless)"); - caps.Categories.AddCategoryMapping(2330, NewznabStandardCategory.AudioMP3, "|- AOR (Melodic Hard Rock, Arena rock) (lossy)"); - caps.Categories.AddCategoryMapping(1708, NewznabStandardCategory.AudioLossless, "|- Pop-Rock & Soft Rock (lossless)"); - caps.Categories.AddCategoryMapping(1709, NewznabStandardCategory.AudioMP3, "|- Pop-Rock & Soft Rock (lossy)"); - caps.Categories.AddCategoryMapping(1710, NewznabStandardCategory.AudioLossless, "|- Instrumental Guitar Rock (lossless)"); - caps.Categories.AddCategoryMapping(1711, NewznabStandardCategory.AudioMP3, "|- Instrumental Guitar Rock (lossy)"); - caps.Categories.AddCategoryMapping(1712, NewznabStandardCategory.AudioLossless, "|- Rockabilly, Psychobilly, Rock'n'Roll (lossless)"); - caps.Categories.AddCategoryMapping(1713, NewznabStandardCategory.AudioMP3, "|- Rockabilly, Psychobilly, Rock'n'Roll (lossy)"); - caps.Categories.AddCategoryMapping(731, NewznabStandardCategory.AudioLossless, "|- Сборники зарубежного рока (lossless)"); - caps.Categories.AddCategoryMapping(1799, NewznabStandardCategory.AudioMP3, "|- Сборники зарубежного рока (lossy)"); - caps.Categories.AddCategoryMapping(1714, NewznabStandardCategory.AudioLossless, "|- Восточноазиатский рок (lossless)"); - caps.Categories.AddCategoryMapping(1715, NewznabStandardCategory.AudioMP3, "|- Восточноазиатский рок (lossy)"); - caps.Categories.AddCategoryMapping(1716, NewznabStandardCategory.Audio, "Зарубежный Metal"); - caps.Categories.AddCategoryMapping(1796, NewznabStandardCategory.AudioLossless, "|- Avant-garde, Experimental Metal (lossless)"); - caps.Categories.AddCategoryMapping(1797, NewznabStandardCategory.AudioMP3, "|- Avant-garde, Experimental Metal (lossy)"); - caps.Categories.AddCategoryMapping(1719, NewznabStandardCategory.AudioLossless, "|- Black (lossless)"); - caps.Categories.AddCategoryMapping(1778, NewznabStandardCategory.AudioMP3, "|- Black (lossy)"); - caps.Categories.AddCategoryMapping(1779, NewznabStandardCategory.AudioLossless, "|- Death, Doom (lossless)"); - caps.Categories.AddCategoryMapping(1780, NewznabStandardCategory.AudioMP3, "|- Death, Doom (lossy)"); - caps.Categories.AddCategoryMapping(1720, NewznabStandardCategory.AudioLossless, "|- Folk, Pagan, Viking (lossless)"); - caps.Categories.AddCategoryMapping(798, NewznabStandardCategory.AudioMP3, "|- Folk, Pagan, Viking (lossy)"); - caps.Categories.AddCategoryMapping(1724, NewznabStandardCategory.AudioLossless, "|- Gothic Metal (lossless)"); - caps.Categories.AddCategoryMapping(1725, NewznabStandardCategory.AudioMP3, "|- Gothic Metal (lossy)"); - caps.Categories.AddCategoryMapping(1730, NewznabStandardCategory.AudioLossless, "|- Grind, Brutal Death (lossless)"); - caps.Categories.AddCategoryMapping(1731, NewznabStandardCategory.AudioMP3, "|- Grind, Brutal Death (lossy)"); - caps.Categories.AddCategoryMapping(1726, NewznabStandardCategory.AudioLossless, "|- Heavy, Power, Progressive (lossless)"); - caps.Categories.AddCategoryMapping(1727, NewznabStandardCategory.AudioMP3, "|- Heavy, Power, Progressive (lossy)"); - caps.Categories.AddCategoryMapping(1815, NewznabStandardCategory.AudioLossless, "|- Sludge, Stoner, Post-Metal (lossless)"); - caps.Categories.AddCategoryMapping(1816, NewznabStandardCategory.AudioMP3, "|- Sludge, Stoner, Post-Metal (lossy)"); - caps.Categories.AddCategoryMapping(1728, NewznabStandardCategory.AudioLossless, "|- Thrash, Speed (lossless)"); - caps.Categories.AddCategoryMapping(1729, NewznabStandardCategory.AudioMP3, "|- Thrash, Speed (lossy)"); - caps.Categories.AddCategoryMapping(2230, NewznabStandardCategory.AudioLossless, "|- Сборники (lossless)"); - caps.Categories.AddCategoryMapping(2231, NewznabStandardCategory.AudioMP3, "|- Сборники (lossy)"); - caps.Categories.AddCategoryMapping(1732, NewznabStandardCategory.Audio, "Зарубежные Alternative, Punk, Independent"); - caps.Categories.AddCategoryMapping(1736, NewznabStandardCategory.AudioLossless, "|- Alternative & Nu-metal (lossless)"); - caps.Categories.AddCategoryMapping(1737, NewznabStandardCategory.AudioMP3, "|- Alternative & Nu-metal (lossy)"); - caps.Categories.AddCategoryMapping(1738, NewznabStandardCategory.AudioLossless, "|- Punk (lossless)"); - caps.Categories.AddCategoryMapping(1739, NewznabStandardCategory.AudioMP3, "|- Punk (lossy)"); - caps.Categories.AddCategoryMapping(1740, NewznabStandardCategory.AudioLossless, "|- Hardcore (lossless)"); - caps.Categories.AddCategoryMapping(1741, NewznabStandardCategory.AudioMP3, "|- Hardcore (lossy)"); - caps.Categories.AddCategoryMapping(1742, NewznabStandardCategory.AudioLossless, "|- Indie, Post-Rock & Post-Punk (lossless)"); - caps.Categories.AddCategoryMapping(1743, NewznabStandardCategory.AudioMP3, "|- Indie, Post-Rock & Post-Punk (lossy)"); - caps.Categories.AddCategoryMapping(1744, NewznabStandardCategory.AudioLossless, "|- Industrial & Post-industrial (lossless)"); - caps.Categories.AddCategoryMapping(1745, NewznabStandardCategory.AudioMP3, "|- Industrial & Post-industrial (lossy)"); - caps.Categories.AddCategoryMapping(1746, NewznabStandardCategory.AudioLossless, "|- Emocore, Post-hardcore, Metalcore (lossless)"); - caps.Categories.AddCategoryMapping(1747, NewznabStandardCategory.AudioMP3, "|- Emocore, Post-hardcore, Metalcore (lossy)"); - caps.Categories.AddCategoryMapping(1748, NewznabStandardCategory.AudioLossless, "|- Gothic Rock & Dark Folk (lossless)"); - caps.Categories.AddCategoryMapping(1749, NewznabStandardCategory.AudioMP3, "|- Gothic Rock & Dark Folk (lossy)"); - caps.Categories.AddCategoryMapping(2175, NewznabStandardCategory.AudioLossless, "|- Avant-garde, Experimental Rock (lossless)"); - caps.Categories.AddCategoryMapping(2174, NewznabStandardCategory.AudioMP3, "|- Avant-garde, Experimental Rock (lossy)"); - caps.Categories.AddCategoryMapping(722, NewznabStandardCategory.Audio, "Отечественный Rock, Metal"); - caps.Categories.AddCategoryMapping(737, NewznabStandardCategory.AudioLossless, "|- Rock (lossless)"); - caps.Categories.AddCategoryMapping(738, NewznabStandardCategory.AudioMP3, "|- Rock (lossy)"); - caps.Categories.AddCategoryMapping(464, NewznabStandardCategory.AudioLossless, "|- Alternative, Punk, Independent (lossless)"); - caps.Categories.AddCategoryMapping(463, NewznabStandardCategory.AudioMP3, "|- Alternative, Punk, Independent (lossy)"); - caps.Categories.AddCategoryMapping(739, NewznabStandardCategory.AudioLossless, "|- Metal (lossless)"); - caps.Categories.AddCategoryMapping(740, NewznabStandardCategory.AudioMP3, "|- Metal (lossy)"); - caps.Categories.AddCategoryMapping(951, NewznabStandardCategory.AudioLossless, "|- Rock на языках народов xUSSR (lossless)"); - caps.Categories.AddCategoryMapping(952, NewznabStandardCategory.AudioMP3, "|- Rock на языках народов xUSSR (lossy)"); - caps.Categories.AddCategoryMapping(1821, NewznabStandardCategory.Audio, "Trance, Goa Trance, Psy-Trance, PsyChill, Ambient, Dub"); - caps.Categories.AddCategoryMapping(1844, NewznabStandardCategory.AudioLossless, "|- Goa Trance, Psy-Trance (lossless)"); - caps.Categories.AddCategoryMapping(1822, NewznabStandardCategory.AudioMP3, "|- Goa Trance, Psy-Trance (lossy)"); - caps.Categories.AddCategoryMapping(1894, NewznabStandardCategory.AudioLossless, "|- PsyChill, Ambient, Dub (lossless)"); - caps.Categories.AddCategoryMapping(1895, NewznabStandardCategory.AudioMP3, "|- PsyChill, Ambient, Dub (lossy)"); - caps.Categories.AddCategoryMapping(460, NewznabStandardCategory.AudioMP3, "|- Goa Trance, Psy-Trance, PsyChill, Ambient, Dub (Live Sets, Mixes) (lossy)"); - caps.Categories.AddCategoryMapping(1818, NewznabStandardCategory.AudioLossless, "|- Trance (lossless)"); - caps.Categories.AddCategoryMapping(1819, NewznabStandardCategory.AudioMP3, "|- Trance (lossy)"); - caps.Categories.AddCategoryMapping(1847, NewznabStandardCategory.AudioMP3, "|- Trance (Singles, EPs) (lossy)"); - caps.Categories.AddCategoryMapping(1824, NewznabStandardCategory.AudioMP3, "|- Trance (Radioshows, Podcasts, Live Sets, Mixes) (lossy)"); - caps.Categories.AddCategoryMapping(1807, NewznabStandardCategory.Audio, "House, Techno, Hardcore, Hardstyle, Jumpstyle"); - caps.Categories.AddCategoryMapping(1829, NewznabStandardCategory.AudioLossless, "|- Hardcore, Hardstyle, Jumpstyle (lossless)"); - caps.Categories.AddCategoryMapping(1830, NewznabStandardCategory.AudioMP3, "|- Hardcore, Hardstyle, Jumpstyle (lossy)"); - caps.Categories.AddCategoryMapping(1831, NewznabStandardCategory.AudioMP3, "|- Hardcore, Hardstyle, Jumpstyle (vinyl, web)"); - caps.Categories.AddCategoryMapping(1857, NewznabStandardCategory.AudioLossless, "|- House (lossless)"); - caps.Categories.AddCategoryMapping(1859, NewznabStandardCategory.AudioMP3, "|- House (Radioshow, Podcast, Liveset, Mixes)"); - caps.Categories.AddCategoryMapping(1858, NewznabStandardCategory.AudioMP3, "|- House (lossy)"); - caps.Categories.AddCategoryMapping(840, NewznabStandardCategory.AudioMP3, "|- House (Проморелизы, сборники) (lossy)"); - caps.Categories.AddCategoryMapping(1860, NewznabStandardCategory.AudioMP3, "|- House (Singles, EPs) (lossy)"); - caps.Categories.AddCategoryMapping(1825, NewznabStandardCategory.AudioLossless, "|- Techno (lossless)"); - caps.Categories.AddCategoryMapping(1826, NewznabStandardCategory.AudioMP3, "|- Techno (lossy)"); - caps.Categories.AddCategoryMapping(1827, NewznabStandardCategory.AudioMP3, "|- Techno (Radioshows, Podcasts, Livesets, Mixes)"); - caps.Categories.AddCategoryMapping(1828, NewznabStandardCategory.AudioMP3, "|- Techno (Singles, EPs) (lossy)"); - caps.Categories.AddCategoryMapping(1808, NewznabStandardCategory.Audio, "Drum & Bass, Jungle, Breakbeat, Dubstep, IDM, Electro"); - caps.Categories.AddCategoryMapping(797, NewznabStandardCategory.AudioLossless, "|- Electro, Electro-Freestyle, Nu Electro (lossless)"); - caps.Categories.AddCategoryMapping(1805, NewznabStandardCategory.AudioMP3, "|- Electro, Electro-Freestyle, Nu Electro (lossy)"); - caps.Categories.AddCategoryMapping(1832, NewznabStandardCategory.AudioLossless, "|- Drum & Bass, Jungle (lossless)"); - caps.Categories.AddCategoryMapping(1833, NewznabStandardCategory.AudioMP3, "|- Drum & Bass, Jungle (lossy)"); - caps.Categories.AddCategoryMapping(1834, NewznabStandardCategory.AudioMP3, "|- Drum & Bass, Jungle (Radioshows, Podcasts, Livesets, Mixes)"); - caps.Categories.AddCategoryMapping(1836, NewznabStandardCategory.AudioLossless, "|- Breakbeat (lossless)"); - caps.Categories.AddCategoryMapping(1837, NewznabStandardCategory.AudioMP3, "|- Breakbeat (lossy)"); - caps.Categories.AddCategoryMapping(1839, NewznabStandardCategory.AudioLossless, "|- Dubstep (lossless)"); - caps.Categories.AddCategoryMapping(454, NewznabStandardCategory.AudioMP3, "|- Dubstep (lossy)"); - caps.Categories.AddCategoryMapping(1838, NewznabStandardCategory.AudioMP3, "|- Breakbeat, Dubstep (Radioshows, Podcasts, Livesets, Mixes)"); - caps.Categories.AddCategoryMapping(1840, NewznabStandardCategory.AudioLossless, "|- IDM (lossless)"); - caps.Categories.AddCategoryMapping(1841, NewznabStandardCategory.AudioMP3, "|- IDM (lossy)"); - caps.Categories.AddCategoryMapping(2229, NewznabStandardCategory.AudioMP3, "|- IDM Discography & Collections (lossy)"); - caps.Categories.AddCategoryMapping(1809, NewznabStandardCategory.Audio, "Chillout, Lounge, Downtempo, Trip-Hop"); - caps.Categories.AddCategoryMapping(1861, NewznabStandardCategory.AudioLossless, "|- Chillout, Lounge, Downtempo (lossless)"); - caps.Categories.AddCategoryMapping(1862, NewznabStandardCategory.AudioMP3, "|- Chillout, Lounge, Downtempo (lossy)"); - caps.Categories.AddCategoryMapping(1947, NewznabStandardCategory.AudioLossless, "|- Nu Jazz, Acid Jazz, Future Jazz (lossless)"); - caps.Categories.AddCategoryMapping(1946, NewznabStandardCategory.AudioMP3, "|- Nu Jazz, Acid Jazz, Future Jazz (lossy)"); - caps.Categories.AddCategoryMapping(1945, NewznabStandardCategory.AudioLossless, "|- Trip Hop, Abstract Hip-Hop (lossless)"); - caps.Categories.AddCategoryMapping(1944, NewznabStandardCategory.AudioMP3, "|- Trip Hop, Abstract Hip-Hop (lossy)"); - caps.Categories.AddCategoryMapping(1810, NewznabStandardCategory.Audio, "Traditional Electronic, Ambient, Modern Classical, Electroacoustic, Experimental"); - caps.Categories.AddCategoryMapping(1864, NewznabStandardCategory.AudioLossless, "|- Traditional Electronic, Ambient (lossless)"); - caps.Categories.AddCategoryMapping(1865, NewznabStandardCategory.AudioMP3, "|- Traditional Electronic, Ambient (lossy)"); - caps.Categories.AddCategoryMapping(1871, NewznabStandardCategory.AudioLossless, "|- Modern Classical, Electroacoustic (lossless)"); - caps.Categories.AddCategoryMapping(1867, NewznabStandardCategory.AudioMP3, "|- Modern Classical, Electroacoustic (lossy)"); - caps.Categories.AddCategoryMapping(1869, NewznabStandardCategory.AudioLossless, "|- Experimental (lossless)"); - caps.Categories.AddCategoryMapping(1873, NewznabStandardCategory.AudioMP3, "|- Experimental (lossy)"); - caps.Categories.AddCategoryMapping(1811, NewznabStandardCategory.Audio, "Industrial, Noise, EBM, Dark Electro, Aggrotech, Cyberpunk, Synthpop, New Wave"); - caps.Categories.AddCategoryMapping(1868, NewznabStandardCategory.AudioLossless, "|- EBM, Dark Electro, Aggrotech (lossless)"); - caps.Categories.AddCategoryMapping(1875, NewznabStandardCategory.AudioMP3, "|- EBM, Dark Electro, Aggrotech (lossy)"); - caps.Categories.AddCategoryMapping(1877, NewznabStandardCategory.AudioLossless, "|- Industrial, Noise (lossless)"); - caps.Categories.AddCategoryMapping(1878, NewznabStandardCategory.AudioMP3, "|- Industrial, Noise (lossy)"); - caps.Categories.AddCategoryMapping(1907, NewznabStandardCategory.Audio, "|- Cyberpunk, 8-bit, Chiptune (lossy & lossless)"); - caps.Categories.AddCategoryMapping(1880, NewznabStandardCategory.AudioLossless, "|- Synthpop, Futurepop, New Wave, Electropop (lossless)"); - caps.Categories.AddCategoryMapping(1881, NewznabStandardCategory.AudioMP3, "|- Synthpop, Futurepop, New Wave, Electropop (lossy)"); - caps.Categories.AddCategoryMapping(466, NewznabStandardCategory.AudioLossless, "|- Synthwave, Spacesynth, Dreamwave, Retrowave, Outrun (lossless)"); - caps.Categories.AddCategoryMapping(465, NewznabStandardCategory.AudioMP3, "|- Synthwave, Spacesynth, Dreamwave, Retrowave, Outrun (lossy)"); - caps.Categories.AddCategoryMapping(1866, NewznabStandardCategory.AudioLossless, "|- Darkwave, Neoclassical, Ethereal, Dungeon Synth (lossless)"); - caps.Categories.AddCategoryMapping(406, NewznabStandardCategory.AudioMP3, "|- Darkwave, Neoclassical, Ethereal, Dungeon Synth (lossy)"); - caps.Categories.AddCategoryMapping(1299, NewznabStandardCategory.Audio, "Hi-Res stereo и многоканальная музыка"); - caps.Categories.AddCategoryMapping(1884, NewznabStandardCategory.Audio, "|- Классика и классика в современной обработке (Hi-Res stereo)"); - caps.Categories.AddCategoryMapping(1164, NewznabStandardCategory.Audio, "|- Классика и классика в современной обработке (многоканальная музыка)"); - caps.Categories.AddCategoryMapping(2513, NewznabStandardCategory.Audio, "|- New Age, Relax, Meditative & Flamenco (Hi-Res stereo и многоканальная музыка)"); - caps.Categories.AddCategoryMapping(1397, NewznabStandardCategory.Audio, "|- Саундтреки (Hi-Res stereo и многоканальная музыка)"); - caps.Categories.AddCategoryMapping(2512, NewznabStandardCategory.Audio, "|- Музыка разных жанров (Hi-Res stereo и многоканальная музыка)"); - caps.Categories.AddCategoryMapping(1885, NewznabStandardCategory.Audio, "|- Поп-музыка (Hi-Res stereo)"); - caps.Categories.AddCategoryMapping(1163, NewznabStandardCategory.Audio, "|- Поп-музыка (многоканальная музыка)"); - caps.Categories.AddCategoryMapping(2302, NewznabStandardCategory.Audio, "|- Джаз и Блюз (Hi-Res stereo)"); - caps.Categories.AddCategoryMapping(2303, NewznabStandardCategory.Audio, "|- Джаз и Блюз (многоканальная музыка)"); - caps.Categories.AddCategoryMapping(1755, NewznabStandardCategory.Audio, "|- Рок-музыка (Hi-Res stereo)"); - caps.Categories.AddCategoryMapping(1757, NewznabStandardCategory.Audio, "|- Рок-музыка (многоканальная музыка)"); - caps.Categories.AddCategoryMapping(1893, NewznabStandardCategory.Audio, "|- Электронная музыка (Hi-Res stereo)"); - caps.Categories.AddCategoryMapping(1890, NewznabStandardCategory.Audio, "|- Электронная музыка (многоканальная музыка)"); - caps.Categories.AddCategoryMapping(2219, NewznabStandardCategory.Audio, "Оцифровки с аналоговых носителей"); - caps.Categories.AddCategoryMapping(1660, NewznabStandardCategory.Audio, "|- Классика и классика в современной обработке (оцифровки)"); - caps.Categories.AddCategoryMapping(506, NewznabStandardCategory.Audio, "|- Фольклор, народная и этническая музыка (оцифровки)"); - caps.Categories.AddCategoryMapping(1835, NewznabStandardCategory.Audio, "|- Rap, Hip-Hop, R'n'B, Reggae, Ska, Dub (оцифровки)"); - caps.Categories.AddCategoryMapping(1625, NewznabStandardCategory.Audio, "|- Саундтреки и мюзиклы (оцифровки)"); - caps.Categories.AddCategoryMapping(1217, NewznabStandardCategory.Audio, "|- Шансон, авторские, военные песни и марши (оцифровки)"); - caps.Categories.AddCategoryMapping(974, NewznabStandardCategory.Audio, "|- Музыка других жанров (оцифровки)"); - caps.Categories.AddCategoryMapping(1444, NewznabStandardCategory.Audio, "|- Зарубежная поп-музыка (оцифровки)"); - caps.Categories.AddCategoryMapping(2401, NewznabStandardCategory.Audio, "|- Советская эстрада, ретро, романсы (оцифровки)"); - caps.Categories.AddCategoryMapping(239, NewznabStandardCategory.Audio, "|- Отечественная поп-музыка (оцифровки)"); - caps.Categories.AddCategoryMapping(450, NewznabStandardCategory.Audio, "|- Инструментальная поп-музыка (оцифровки)"); - caps.Categories.AddCategoryMapping(2301, NewznabStandardCategory.Audio, "|- Джаз и блюз (оцифровки)"); - caps.Categories.AddCategoryMapping(123, NewznabStandardCategory.Audio, "|- Alternative, Punk, Independent (оцифровки)"); - caps.Categories.AddCategoryMapping(1756, NewznabStandardCategory.Audio, "|- Зарубежная рок-музыка (оцифровки)"); - caps.Categories.AddCategoryMapping(1758, NewznabStandardCategory.Audio, "|- Отечественная рок-музыка (оцифровки)"); - caps.Categories.AddCategoryMapping(1766, NewznabStandardCategory.Audio, "|- Зарубежный и Отечественный Metal (оцифровки)"); - caps.Categories.AddCategoryMapping(1754, NewznabStandardCategory.Audio, "|- Электронная музыка (оцифровки)"); - caps.Categories.AddCategoryMapping(860, NewznabStandardCategory.Audio, "Неофициальные конверсии цифровых форматов"); - caps.Categories.AddCategoryMapping(453, NewznabStandardCategory.Audio, "|- Конверсии Quadraphonic"); - caps.Categories.AddCategoryMapping(1170, NewznabStandardCategory.Audio, "|- Конверсии SACD"); - caps.Categories.AddCategoryMapping(1759, NewznabStandardCategory.Audio, "|- Конверсии Blu-Ray, ADVD и DVD-Audio"); - caps.Categories.AddCategoryMapping(1852, NewznabStandardCategory.Audio, "|- Апмиксы-Upmixes/Даунмиксы-Downmix"); - caps.Categories.AddCategoryMapping(413, NewznabStandardCategory.AudioVideo, "Музыкальное SD видео"); - caps.Categories.AddCategoryMapping(445, NewznabStandardCategory.AudioVideo, "|- Классическая и современная академическая музыка (Видео)"); - caps.Categories.AddCategoryMapping(702, NewznabStandardCategory.AudioVideo, "|- Опера, Оперетта и Мюзикл (Видео)"); - caps.Categories.AddCategoryMapping(1990, NewznabStandardCategory.AudioVideo, "|- Балет и современная хореография (Видео)"); - caps.Categories.AddCategoryMapping(1793, NewznabStandardCategory.AudioVideo, "|- Классика в современной обработке, Classical Crossover (Видео)"); - caps.Categories.AddCategoryMapping(1141, NewznabStandardCategory.AudioVideo, "|- Фольклор, Народная и Этническая музыка и фламенко (Видео)"); - caps.Categories.AddCategoryMapping(1775, NewznabStandardCategory.AudioVideo, "|- New Age, Relax, Meditative, Рэп, Хип-Хоп, R'n'B, Reggae, Ska, Dub (Видео)"); - caps.Categories.AddCategoryMapping(1227, NewznabStandardCategory.AudioVideo, "|- Зарубежный и Отечественный Шансон, Авторская и Военная песня (Видео)"); - caps.Categories.AddCategoryMapping(475, NewznabStandardCategory.AudioVideo, "|- Музыка других жанров, Советская эстрада, ретро, романсы (Видео)"); - caps.Categories.AddCategoryMapping(1121, NewznabStandardCategory.AudioVideo, "|- Отечественная поп-музыка (Видео)"); - caps.Categories.AddCategoryMapping(431, NewznabStandardCategory.AudioVideo, "|- Зарубежная Поп-музыка, Eurodance, Disco (Видео)"); - caps.Categories.AddCategoryMapping(2378, NewznabStandardCategory.AudioVideo, "|- Восточноазиатская поп-музыка (Видео)"); - caps.Categories.AddCategoryMapping(2383, NewznabStandardCategory.AudioVideo, "|- Разножанровые сборные концерты и сборники видеоклипов (Видео)"); - caps.Categories.AddCategoryMapping(2305, NewznabStandardCategory.AudioVideo, "|- Джаз и Блюз (Видео)"); - caps.Categories.AddCategoryMapping(1782, NewznabStandardCategory.AudioVideo, "|- Rock (Видео)"); - caps.Categories.AddCategoryMapping(1787, NewznabStandardCategory.AudioVideo, "|- Metal (Видео)"); - caps.Categories.AddCategoryMapping(1789, NewznabStandardCategory.AudioVideo, "|- Зарубежный Alternative, Punk, Independent (Видео)"); - caps.Categories.AddCategoryMapping(1791, NewznabStandardCategory.AudioVideo, "|- Отечественный Рок, Панк, Альтернатива (Видео)"); - caps.Categories.AddCategoryMapping(1912, NewznabStandardCategory.AudioVideo, "|- Электронная музыка (Видео)"); - caps.Categories.AddCategoryMapping(1189, NewznabStandardCategory.AudioVideo, "|- Документальные фильмы о музыке и музыкантах (Видео)"); - caps.Categories.AddCategoryMapping(2403, NewznabStandardCategory.AudioVideo, "Музыкальное DVD видео"); - caps.Categories.AddCategoryMapping(984, NewznabStandardCategory.AudioVideo, "|- Классическая и современная академическая музыка (DVD Video)"); - caps.Categories.AddCategoryMapping(983, NewznabStandardCategory.AudioVideo, "|- Опера, Оперетта и Мюзикл (DVD видео)"); - caps.Categories.AddCategoryMapping(2352, NewznabStandardCategory.AudioVideo, "|- Балет и современная хореография (DVD Video)"); - caps.Categories.AddCategoryMapping(2384, NewznabStandardCategory.AudioVideo, "|- Классика в современной обработке, Classical Crossover (DVD Video)"); - caps.Categories.AddCategoryMapping(1142, NewznabStandardCategory.AudioVideo, "|- Фольклор, Народная и Этническая музыка и Flamenco (DVD Video)"); - caps.Categories.AddCategoryMapping(1107, NewznabStandardCategory.AudioVideo, "|- New Age, Relax, Meditative, Рэп, Хип-Хоп, R'n'B, Reggae, Ska, Dub (DVD Video)"); - caps.Categories.AddCategoryMapping(1228, NewznabStandardCategory.AudioVideo, "|- Зарубежный и Отечественный Шансон, Авторская и Военная песня (DVD Video)"); - caps.Categories.AddCategoryMapping(988, NewznabStandardCategory.AudioVideo, "|- Музыка других жанров, Советская эстрада, ретро, романсы (DVD Video)"); - caps.Categories.AddCategoryMapping(1122, NewznabStandardCategory.AudioVideo, "|- Отечественная поп-музыка (DVD Video)"); - caps.Categories.AddCategoryMapping(986, NewznabStandardCategory.AudioVideo, "|- Зарубежная Поп-музыка, Eurodance, Disco (DVD Video)"); - caps.Categories.AddCategoryMapping(2379, NewznabStandardCategory.AudioVideo, "|- Восточноазиатская поп-музыка (DVD Video)"); - caps.Categories.AddCategoryMapping(2088, NewznabStandardCategory.AudioVideo, "|- Разножанровые сборные концерты и сборники видеоклипов (DVD Video)"); - caps.Categories.AddCategoryMapping(2304, NewznabStandardCategory.AudioVideo, "|- Джаз и Блюз (DVD Видео)"); - caps.Categories.AddCategoryMapping(1783, NewznabStandardCategory.AudioVideo, "|- Зарубежный Rock (DVD Video)"); - caps.Categories.AddCategoryMapping(1788, NewznabStandardCategory.AudioVideo, "|- Зарубежный Metal (DVD Video)"); - caps.Categories.AddCategoryMapping(1790, NewznabStandardCategory.AudioVideo, "|- Зарубежный Alternative, Punk, Independent (DVD Video)"); - caps.Categories.AddCategoryMapping(1792, NewznabStandardCategory.AudioVideo, "|- Отечественный Рок, Метал, Панк, Альтернатива (DVD Video)"); - caps.Categories.AddCategoryMapping(1886, NewznabStandardCategory.AudioVideo, "|- Электронная музыка (DVD Video)"); - caps.Categories.AddCategoryMapping(2509, NewznabStandardCategory.AudioVideo, "|- Документальные фильмы о музыке и музыкантах (DVD Video)"); - caps.Categories.AddCategoryMapping(2507, NewznabStandardCategory.AudioVideo, "Неофициальные DVD видео"); - caps.Categories.AddCategoryMapping(2263, NewznabStandardCategory.AudioVideo, "Классическая музыка, Опера, Балет, Мюзикл (Неофициальные DVD Video)"); - caps.Categories.AddCategoryMapping(2511, NewznabStandardCategory.AudioVideo, "Шансон, Авторская песня, Сборные концерты, МДЖ (Неофициальные DVD Video)"); - caps.Categories.AddCategoryMapping(2264, NewznabStandardCategory.AudioVideo, "|- Зарубежная и Отечественная Поп-музыка (Неофициальные DVD Video)"); - caps.Categories.AddCategoryMapping(2262, NewznabStandardCategory.AudioVideo, "|- Джаз и Блюз (Неофициальные DVD Video)"); - caps.Categories.AddCategoryMapping(2261, NewznabStandardCategory.AudioVideo, "|- Зарубежная и Отечественная Рок-музыка (Неофициальные DVD Video)"); - caps.Categories.AddCategoryMapping(1887, NewznabStandardCategory.AudioVideo, "|- Электронная музыка (Неофициальные DVD Video)"); - caps.Categories.AddCategoryMapping(2531, NewznabStandardCategory.AudioVideo, "|- Прочие жанры (Неофициальные DVD видео)"); - caps.Categories.AddCategoryMapping(2400, NewznabStandardCategory.AudioVideo, "Музыкальное HD видео"); - caps.Categories.AddCategoryMapping(1812, NewznabStandardCategory.AudioVideo, "|- Классическая и современная академическая музыка (HD Video)"); - caps.Categories.AddCategoryMapping(655, NewznabStandardCategory.AudioVideo, "|- Опера, Оперетта и Мюзикл (HD Видео)"); - caps.Categories.AddCategoryMapping(1777, NewznabStandardCategory.AudioVideo, "|- Балет и современная хореография (HD Video)"); - caps.Categories.AddCategoryMapping(2530, NewznabStandardCategory.AudioVideo, "|- Фольклор, Народная, Этническая музыка и Flamenco (HD Видео)"); - caps.Categories.AddCategoryMapping(2529, NewznabStandardCategory.AudioVideo, "|- New Age, Relax, Meditative, Рэп, Хип-Хоп, R'n'B, Reggae, Ska, Dub (HD Видео)"); - caps.Categories.AddCategoryMapping(1781, NewznabStandardCategory.AudioVideo, "|- Музыка других жанров, Разножанровые сборные концерты (HD видео)"); - caps.Categories.AddCategoryMapping(2508, NewznabStandardCategory.AudioVideo, "|- Зарубежная поп-музыка (HD Video)"); - caps.Categories.AddCategoryMapping(2426, NewznabStandardCategory.AudioVideo, "|- Отечественная поп-музыка (HD видео)"); - caps.Categories.AddCategoryMapping(2351, NewznabStandardCategory.AudioVideo, "|- Восточноазиатская Поп-музыка (HD Video)"); - caps.Categories.AddCategoryMapping(2306, NewznabStandardCategory.AudioVideo, "|- Джаз и Блюз (HD Video)"); - caps.Categories.AddCategoryMapping(1795, NewznabStandardCategory.AudioVideo, "|- Зарубежный рок (HD Video)"); - caps.Categories.AddCategoryMapping(2271, NewznabStandardCategory.AudioVideo, "|- Отечественный рок (HD видео)"); - caps.Categories.AddCategoryMapping(1913, NewznabStandardCategory.AudioVideo, "|- Электронная музыка (HD Video)"); - caps.Categories.AddCategoryMapping(1784, NewznabStandardCategory.AudioVideo, "|- UHD музыкальное видео"); - caps.Categories.AddCategoryMapping(1892, NewznabStandardCategory.AudioVideo, "|- Документальные фильмы о музыке и музыкантах (HD Video)"); - caps.Categories.AddCategoryMapping(518, NewznabStandardCategory.AudioVideo, "Некондиционное музыкальное видео (Видео, DVD видео, HD видео)"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.PCGames, "Игры для Windows"); - caps.Categories.AddCategoryMapping(635, NewznabStandardCategory.PCGames, "|- Горячие Новинки"); - caps.Categories.AddCategoryMapping(127, NewznabStandardCategory.PCGames, "|- Аркады"); - caps.Categories.AddCategoryMapping(2203, NewznabStandardCategory.PCGames, "|- Файтинги"); - caps.Categories.AddCategoryMapping(647, NewznabStandardCategory.PCGames, "|- Экшены от первого лица"); - caps.Categories.AddCategoryMapping(646, NewznabStandardCategory.PCGames, "|- Экшены от третьего лица"); - caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.PCGames, "|- Хорроры"); - caps.Categories.AddCategoryMapping(53, NewznabStandardCategory.PCGames, "|- Приключения и квесты"); - caps.Categories.AddCategoryMapping(1008, NewznabStandardCategory.PCGames, "|- Квесты в стиле \"Поиск предметов\""); - caps.Categories.AddCategoryMapping(900, NewznabStandardCategory.PCGames, "|- Визуальные новеллы"); - caps.Categories.AddCategoryMapping(128, NewznabStandardCategory.PCGames, "|- Для самых маленьких"); - caps.Categories.AddCategoryMapping(2204, NewznabStandardCategory.PCGames, "|- Логические игры"); - caps.Categories.AddCategoryMapping(278, NewznabStandardCategory.PCGames, "|- Шахматы"); - caps.Categories.AddCategoryMapping(2118, NewznabStandardCategory.PCGames, "|- Многопользовательские игры"); - caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.PCGames, "|- Ролевые игры"); - caps.Categories.AddCategoryMapping(54, NewznabStandardCategory.PCGames, "|- Симуляторы"); - caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.PCGames, "|- Стратегии в реальном времени"); - caps.Categories.AddCategoryMapping(2226, NewznabStandardCategory.PCGames, "|- Пошаговые стратегии"); - caps.Categories.AddCategoryMapping(2228, NewznabStandardCategory.PCGames, "|- IBM-PC-несовместимые компьютеры"); - caps.Categories.AddCategoryMapping(139, NewznabStandardCategory.PCGames, "Прочее для Windows-игр"); - caps.Categories.AddCategoryMapping(2478, NewznabStandardCategory.PCGames, "|- Официальные патчи, моды, плагины, дополнения"); - caps.Categories.AddCategoryMapping(2480, NewznabStandardCategory.PCGames, "|- Неофициальные модификации, плагины, дополнения"); - caps.Categories.AddCategoryMapping(2481, NewznabStandardCategory.PCGames, "|- Русификаторы"); - caps.Categories.AddCategoryMapping(2142, NewznabStandardCategory.PCGames, "Прочее для Microsoft Flight Simulator, Prepar3D, X-Plane"); - caps.Categories.AddCategoryMapping(2060, NewznabStandardCategory.PCGames, "|- Сценарии, меши и аэропорты для FS2004, FSX, P3D"); - caps.Categories.AddCategoryMapping(2145, NewznabStandardCategory.PCGames, "|- Самолёты и вертолёты для FS2004, FSX, P3D"); - caps.Categories.AddCategoryMapping(2146, NewznabStandardCategory.PCGames, "|- Миссии, трафик, звуки, паки и утилиты для FS2004, FSX, P3D"); - caps.Categories.AddCategoryMapping(2143, NewznabStandardCategory.PCGames, "|- Сценарии, миссии, трафик, звуки, паки и утилиты для X-Plane"); - caps.Categories.AddCategoryMapping(2012, NewznabStandardCategory.PCGames, "|- Самолёты и вертолёты для X-Plane"); - caps.Categories.AddCategoryMapping(960, NewznabStandardCategory.PCMac, "Игры для Apple Macintosh"); - caps.Categories.AddCategoryMapping(537, NewznabStandardCategory.PCMac, "|- Нативные игры для Mac"); - caps.Categories.AddCategoryMapping(637, NewznabStandardCategory.PCMac, "|- Игры для Mac с Wineskin, DOSBox, Cider и другими"); - caps.Categories.AddCategoryMapping(899, NewznabStandardCategory.PCGames, "Игры для Linux"); - caps.Categories.AddCategoryMapping(1992, NewznabStandardCategory.PCGames, "|- Нативные игры для Linux"); - caps.Categories.AddCategoryMapping(2059, NewznabStandardCategory.PCGames, "|- Игры для Linux с Wine, DOSBox и другими"); - caps.Categories.AddCategoryMapping(548, NewznabStandardCategory.Console, "Игры для консолей"); - caps.Categories.AddCategoryMapping(908, NewznabStandardCategory.Console, "|- PS"); - caps.Categories.AddCategoryMapping(357, NewznabStandardCategory.ConsoleOther, "|- PS2"); - caps.Categories.AddCategoryMapping(886, NewznabStandardCategory.ConsolePS3, "|- PS3"); - caps.Categories.AddCategoryMapping(546, NewznabStandardCategory.Console, "|- Игры PS1, PS2 и PSP для PS3"); - caps.Categories.AddCategoryMapping(973, NewznabStandardCategory.ConsolePS4, "|- PS4"); - caps.Categories.AddCategoryMapping(1352, NewznabStandardCategory.ConsolePSP, "|- PSP"); - caps.Categories.AddCategoryMapping(1116, NewznabStandardCategory.ConsolePSP, "|- Игры PS1 для PSP"); - caps.Categories.AddCategoryMapping(595, NewznabStandardCategory.ConsolePSVita, "|- PS Vita"); - caps.Categories.AddCategoryMapping(887, NewznabStandardCategory.ConsoleXBox, "|- Original Xbox"); - caps.Categories.AddCategoryMapping(510, NewznabStandardCategory.ConsoleXBox360, "|- Xbox 360"); - caps.Categories.AddCategoryMapping(773, NewznabStandardCategory.ConsoleWii, "|- Wii/WiiU"); - caps.Categories.AddCategoryMapping(774, NewznabStandardCategory.ConsoleNDS, "|- NDS/3DS"); - caps.Categories.AddCategoryMapping(1605, NewznabStandardCategory.Console, "|- Switch"); - caps.Categories.AddCategoryMapping(968, NewznabStandardCategory.Console, "|- Dreamcast"); - caps.Categories.AddCategoryMapping(129, NewznabStandardCategory.Console, "|- Остальные платформы"); - caps.Categories.AddCategoryMapping(2185, NewznabStandardCategory.ConsoleOther, "Видео для консолей"); - caps.Categories.AddCategoryMapping(2487, NewznabStandardCategory.ConsoleOther, "|- Видео для PS Vita"); - caps.Categories.AddCategoryMapping(2182, NewznabStandardCategory.ConsoleOther, "|- Фильмы для PSP"); - caps.Categories.AddCategoryMapping(2181, NewznabStandardCategory.ConsoleOther, "|- Сериалы для PSP"); - caps.Categories.AddCategoryMapping(2180, NewznabStandardCategory.ConsoleOther, "|- Мультфильмы для PSP"); - caps.Categories.AddCategoryMapping(2179, NewznabStandardCategory.ConsoleOther, "|- Дорамы для PSP"); - caps.Categories.AddCategoryMapping(2186, NewznabStandardCategory.ConsoleOther, "|- Аниме для PSP"); - caps.Categories.AddCategoryMapping(700, NewznabStandardCategory.ConsoleOther, "|- Видео для PSP"); - caps.Categories.AddCategoryMapping(1926, NewznabStandardCategory.ConsoleOther, "|- Видео для PS3 и других консолей"); - caps.Categories.AddCategoryMapping(650, NewznabStandardCategory.PCMobileOther, "Игры для мобильных устройств"); - caps.Categories.AddCategoryMapping(2149, NewznabStandardCategory.PCMobileAndroid, "|- Игры для Android"); - caps.Categories.AddCategoryMapping(2420, NewznabStandardCategory.ConsoleOther, "|- Игры для Oculus Quest"); - caps.Categories.AddCategoryMapping(1001, NewznabStandardCategory.PC, "|- Игры для Java"); - caps.Categories.AddCategoryMapping(1004, NewznabStandardCategory.PCMobileOther, "|- Игры для Symbian"); - caps.Categories.AddCategoryMapping(1002, NewznabStandardCategory.PCMobileOther, "|- Игры для Windows Mobile"); - caps.Categories.AddCategoryMapping(240, NewznabStandardCategory.OtherMisc, "Игровое видео"); - caps.Categories.AddCategoryMapping(2415, NewznabStandardCategory.OtherMisc, "|- Видеопрохождения игр"); - caps.Categories.AddCategoryMapping(1012, NewznabStandardCategory.PC, "Операционные системы от Microsoft"); - caps.Categories.AddCategoryMapping(2489, NewznabStandardCategory.PC, "|- Оригинальные образы Windows"); - caps.Categories.AddCategoryMapping(2523, NewznabStandardCategory.PC, "|- Сборки Windows 8 и далее"); - caps.Categories.AddCategoryMapping(2153, NewznabStandardCategory.PC, "|- Сборки Windows XP - Windows 7"); - caps.Categories.AddCategoryMapping(1019, NewznabStandardCategory.PC, "|- Операционные системы выпущенные до Windows XP"); - caps.Categories.AddCategoryMapping(1021, NewznabStandardCategory.PC, "|- Серверные ОС (оригинальные + сборки)"); - caps.Categories.AddCategoryMapping(1025, NewznabStandardCategory.PC, "|- Разное (сборки All-in-One, пакеты обновлений, утилиты, и прочее)"); - caps.Categories.AddCategoryMapping(1376, NewznabStandardCategory.PC, "Linux, Unix и другие ОС"); - caps.Categories.AddCategoryMapping(1379, NewznabStandardCategory.PC, "|- Операционные системы (Linux, Unix)"); - caps.Categories.AddCategoryMapping(1381, NewznabStandardCategory.PC, "|- Программное обеспечение (Linux, Unix)"); - caps.Categories.AddCategoryMapping(1473, NewznabStandardCategory.PC, "|- Другие ОС и ПО под них"); - caps.Categories.AddCategoryMapping(1195, NewznabStandardCategory.PC, "Тестовые диски для настройки аудио/видео аппаратуры"); - caps.Categories.AddCategoryMapping(1013, NewznabStandardCategory.PC, "Системные программы"); - caps.Categories.AddCategoryMapping(1028, NewznabStandardCategory.PC, "|- Работа с жёстким диском"); - caps.Categories.AddCategoryMapping(1029, NewznabStandardCategory.PC, "|- Резервное копирование"); - caps.Categories.AddCategoryMapping(1030, NewznabStandardCategory.PC, "|- Архиваторы и файловые менеджеры"); - caps.Categories.AddCategoryMapping(1031, NewznabStandardCategory.PC, "|- Программы для настройки и оптимизации ОС"); - caps.Categories.AddCategoryMapping(1032, NewznabStandardCategory.PC, "|- Сервисное обслуживание компьютера"); - caps.Categories.AddCategoryMapping(1033, NewznabStandardCategory.PC, "|- Работа с носителями информации"); - caps.Categories.AddCategoryMapping(1034, NewznabStandardCategory.PC, "|- Информация и диагностика"); - caps.Categories.AddCategoryMapping(1066, NewznabStandardCategory.PC, "|- Программы для интернет и сетей"); - caps.Categories.AddCategoryMapping(1035, NewznabStandardCategory.PC, "|- ПО для защиты компьютера (Антивирусное ПО, Фаерволлы)"); - caps.Categories.AddCategoryMapping(1038, NewznabStandardCategory.PC, "|- Анти-шпионы и анти-трояны"); - caps.Categories.AddCategoryMapping(1039, NewznabStandardCategory.PC, "|- Программы для защиты информации"); - caps.Categories.AddCategoryMapping(1536, NewznabStandardCategory.PC, "|- Драйверы и прошивки"); - caps.Categories.AddCategoryMapping(1051, NewznabStandardCategory.PC, "|- Оригинальные диски к компьютерам и комплектующим"); - caps.Categories.AddCategoryMapping(1040, NewznabStandardCategory.PC, "|- Серверное ПО для Windows"); - caps.Categories.AddCategoryMapping(1041, NewznabStandardCategory.PC, "|- Изменение интерфейса ОС Windows"); - caps.Categories.AddCategoryMapping(1636, NewznabStandardCategory.PC, "|- Скринсейверы"); - caps.Categories.AddCategoryMapping(1042, NewznabStandardCategory.PC, "|- Разное (Системные программы под Windows)"); - caps.Categories.AddCategoryMapping(1014, NewznabStandardCategory.PC, "Системы для бизнеса, офиса, научной и проектной работы"); - caps.Categories.AddCategoryMapping(2134, NewznabStandardCategory.PC, "|- Медицина - интерактивный софт"); - caps.Categories.AddCategoryMapping(1060, NewznabStandardCategory.PC, "|- Всё для дома: кройка, шитьё, кулинария"); - caps.Categories.AddCategoryMapping(1061, NewznabStandardCategory.PC, "|- Офисные системы"); - caps.Categories.AddCategoryMapping(1062, NewznabStandardCategory.PC, "|- Системы для бизнеса"); - caps.Categories.AddCategoryMapping(1067, NewznabStandardCategory.PC, "|- Распознавание текста, звука и синтез речи"); - caps.Categories.AddCategoryMapping(1086, NewznabStandardCategory.PC, "|- Работа с PDF и DjVu"); - caps.Categories.AddCategoryMapping(1068, NewznabStandardCategory.PC, "|- Словари, переводчики"); - caps.Categories.AddCategoryMapping(1063, NewznabStandardCategory.PC, "|- Системы для научной работы"); - caps.Categories.AddCategoryMapping(1087, NewznabStandardCategory.PC, "|- САПР (общие и машиностроительные)"); - caps.Categories.AddCategoryMapping(1192, NewznabStandardCategory.PC, "|- САПР (электроника, автоматика, ГАП)"); - caps.Categories.AddCategoryMapping(1088, NewznabStandardCategory.PC, "|- Программы для архитекторов и строителей"); - caps.Categories.AddCategoryMapping(1193, NewznabStandardCategory.PC, "|- Библиотеки и проекты для архитекторов и дизайнеров интерьеров"); - caps.Categories.AddCategoryMapping(1071, NewznabStandardCategory.PC, "|- Прочие справочные системы"); - caps.Categories.AddCategoryMapping(1073, NewznabStandardCategory.PC, "|- Разное (Системы для бизнеса, офиса, научной и проектной работы)"); - caps.Categories.AddCategoryMapping(1052, NewznabStandardCategory.PC, "Веб-разработка и Программирование"); - caps.Categories.AddCategoryMapping(1053, NewznabStandardCategory.PC, "|- WYSIWYG Редакторы для веб-диза"); - caps.Categories.AddCategoryMapping(1054, NewznabStandardCategory.PC, "|- Текстовые редакторы с подсветкой"); - caps.Categories.AddCategoryMapping(1055, NewznabStandardCategory.PC, "|- Среды программирования, компиляторы и вспомогательные программы"); - caps.Categories.AddCategoryMapping(1056, NewznabStandardCategory.PC, "|- Компоненты для сред программирования"); - caps.Categories.AddCategoryMapping(2077, NewznabStandardCategory.PC, "|- Системы управления базами данных"); - caps.Categories.AddCategoryMapping(1057, NewznabStandardCategory.PC, "|- Скрипты и движки сайтов, CMS а также расширения к ним"); - caps.Categories.AddCategoryMapping(1018, NewznabStandardCategory.PC, "|- Шаблоны для сайтов и CMS"); - caps.Categories.AddCategoryMapping(1058, NewznabStandardCategory.PC, "|- Разное (Веб-разработка и программирование)"); - caps.Categories.AddCategoryMapping(1016, NewznabStandardCategory.PC, "Программы для работы с мультимедиа и 3D"); - caps.Categories.AddCategoryMapping(1079, NewznabStandardCategory.PC, "|- Программные комплекты"); - caps.Categories.AddCategoryMapping(1080, NewznabStandardCategory.PC, "|- Плагины для программ компании Adobe"); - caps.Categories.AddCategoryMapping(1081, NewznabStandardCategory.PC, "|- Графические редакторы"); - caps.Categories.AddCategoryMapping(1082, NewznabStandardCategory.PC, "|- Программы для верстки, печати и работы со шрифтами"); - caps.Categories.AddCategoryMapping(1083, NewznabStandardCategory.PC, "|- 3D моделирование, рендеринг и плагины для них"); - caps.Categories.AddCategoryMapping(1084, NewznabStandardCategory.PC, "|- Анимация"); - caps.Categories.AddCategoryMapping(1085, NewznabStandardCategory.PC, "|- Создание BD/HD/DVD-видео"); - caps.Categories.AddCategoryMapping(1089, NewznabStandardCategory.PC, "|- Редакторы видео"); - caps.Categories.AddCategoryMapping(1090, NewznabStandardCategory.PC, "|- Видео- Аудио- конверторы"); - caps.Categories.AddCategoryMapping(1065, NewznabStandardCategory.PC, "|- Аудио- и видео-, CD- проигрыватели и каталогизаторы"); - caps.Categories.AddCategoryMapping(1064, NewznabStandardCategory.PC, "|- Каталогизаторы и просмотрщики графики"); - caps.Categories.AddCategoryMapping(1092, NewznabStandardCategory.PC, "|- Разное (Программы для работы с мультимедиа и 3D)"); - caps.Categories.AddCategoryMapping(1204, NewznabStandardCategory.PC, "|- Виртуальные студии, секвенсоры и аудиоредакторы"); - caps.Categories.AddCategoryMapping(1027, NewznabStandardCategory.PC, "|- Виртуальные инструменты и синтезаторы"); - caps.Categories.AddCategoryMapping(1199, NewznabStandardCategory.PC, "|- Плагины для обработки звука"); - caps.Categories.AddCategoryMapping(1091, NewznabStandardCategory.PC, "|- Разное (Программы для работы со звуком)"); - caps.Categories.AddCategoryMapping(828, NewznabStandardCategory.OtherMisc, "Материалы для мультимедиа и дизайна"); - caps.Categories.AddCategoryMapping(1357, NewznabStandardCategory.OtherMisc, "|- Авторские работы"); - caps.Categories.AddCategoryMapping(890, NewznabStandardCategory.OtherMisc, "|- Официальные сборники векторных клипартов"); - caps.Categories.AddCategoryMapping(830, NewznabStandardCategory.OtherMisc, "|- Прочие векторные клипарты"); - caps.Categories.AddCategoryMapping(1290, NewznabStandardCategory.OtherMisc, "|- Photostoсks"); - caps.Categories.AddCategoryMapping(1962, NewznabStandardCategory.OtherMisc, "|- Дополнения для программ компоузинга и постобработки"); - caps.Categories.AddCategoryMapping(831, NewznabStandardCategory.OtherMisc, "|- Рамки, шаблоны, текстуры и фоны"); - caps.Categories.AddCategoryMapping(829, NewznabStandardCategory.OtherMisc, "|- Прочие растровые клипарты"); - caps.Categories.AddCategoryMapping(633, NewznabStandardCategory.OtherMisc, "|- 3D модели, сцены и материалы"); - caps.Categories.AddCategoryMapping(1009, NewznabStandardCategory.OtherMisc, "|- Футажи"); - caps.Categories.AddCategoryMapping(1963, NewznabStandardCategory.OtherMisc, "|- Прочие сборники футажей"); - caps.Categories.AddCategoryMapping(1954, NewznabStandardCategory.OtherMisc, "|- Музыкальные библиотеки"); - caps.Categories.AddCategoryMapping(1010, NewznabStandardCategory.OtherMisc, "|- Звуковые эффекты"); - caps.Categories.AddCategoryMapping(1674, NewznabStandardCategory.OtherMisc, "|- Библиотеки сэмплов"); - caps.Categories.AddCategoryMapping(2421, NewznabStandardCategory.OtherMisc, "|- Библиотеки и саундбанки для сэмплеров, пресеты для синтезаторов"); - caps.Categories.AddCategoryMapping(2492, NewznabStandardCategory.OtherMisc, "|- Multitracks"); - caps.Categories.AddCategoryMapping(839, NewznabStandardCategory.OtherMisc, "|- Материалы для создания меню и обложек DVD"); - caps.Categories.AddCategoryMapping(1679, NewznabStandardCategory.OtherMisc, "|- Дополнения, стили, кисти, формы, узоры для программ Adobe"); - caps.Categories.AddCategoryMapping(1011, NewznabStandardCategory.OtherMisc, "|- Шрифты"); - caps.Categories.AddCategoryMapping(835, NewznabStandardCategory.OtherMisc, "|- Разное (Материалы для мультимедиа и дизайна)"); - caps.Categories.AddCategoryMapping(1503, NewznabStandardCategory.OtherMisc, "ГИС, системы навигации и карты"); - caps.Categories.AddCategoryMapping(1507, NewznabStandardCategory.OtherMisc, "|- ГИС (Геоинформационные системы)"); - caps.Categories.AddCategoryMapping(1526, NewznabStandardCategory.OtherMisc, "|- Карты, снабженные программной оболочкой"); - caps.Categories.AddCategoryMapping(1508, NewznabStandardCategory.OtherMisc, "|- Атласы и карты современные (после 1950 г.)"); - caps.Categories.AddCategoryMapping(1509, NewznabStandardCategory.OtherMisc, "|- Атласы и карты старинные (до 1950 г.)"); - caps.Categories.AddCategoryMapping(1510, NewznabStandardCategory.OtherMisc, "|- Карты прочие (астрономические, исторические, тематические)"); - caps.Categories.AddCategoryMapping(1511, NewznabStandardCategory.OtherMisc, "|- Встроенная автомобильная навигация"); - caps.Categories.AddCategoryMapping(1512, NewznabStandardCategory.OtherMisc, "|- Garmin"); - caps.Categories.AddCategoryMapping(1513, NewznabStandardCategory.OtherMisc, "|- Ozi"); - caps.Categories.AddCategoryMapping(1514, NewznabStandardCategory.OtherMisc, "|- TomTom"); - caps.Categories.AddCategoryMapping(1515, NewznabStandardCategory.OtherMisc, "|- Navigon / Navitel"); - caps.Categories.AddCategoryMapping(1516, NewznabStandardCategory.OtherMisc, "|- Igo"); - caps.Categories.AddCategoryMapping(1517, NewznabStandardCategory.OtherMisc, "|- Разное - системы навигации и карты"); - caps.Categories.AddCategoryMapping(285, NewznabStandardCategory.PCMobileOther, "Приложения для мобильных устройств"); - caps.Categories.AddCategoryMapping(2154, NewznabStandardCategory.PCMobileAndroid, "|- Приложения для Android"); - caps.Categories.AddCategoryMapping(1005, NewznabStandardCategory.PCMobileOther, "|- Приложения для Java"); - caps.Categories.AddCategoryMapping(289, NewznabStandardCategory.PCMobileOther, "|- Приложения для Symbian"); - caps.Categories.AddCategoryMapping(290, NewznabStandardCategory.PCMobileOther, "|- Приложения для Windows Mobile"); - caps.Categories.AddCategoryMapping(288, NewznabStandardCategory.PCMobileOther, "|- Софт для работы с телефоном"); - caps.Categories.AddCategoryMapping(292, NewznabStandardCategory.PCMobileOther, "|- Прошивки для телефонов"); - caps.Categories.AddCategoryMapping(291, NewznabStandardCategory.PCMobileOther, "|- Обои и темы"); - caps.Categories.AddCategoryMapping(957, NewznabStandardCategory.PCMobileOther, "Видео для мобильных устройств"); - caps.Categories.AddCategoryMapping(287, NewznabStandardCategory.PCMobileOther, "|- Видео для смартфонов и КПК"); - caps.Categories.AddCategoryMapping(286, NewznabStandardCategory.PCMobileOther, "|- Видео в формате 3GP для мобильных"); - caps.Categories.AddCategoryMapping(1366, NewznabStandardCategory.PCMac, "Apple Macintosh"); - caps.Categories.AddCategoryMapping(1368, NewznabStandardCategory.PCMac, "|- Mac OS (для Macintosh)"); - caps.Categories.AddCategoryMapping(1383, NewznabStandardCategory.PCMac, "|- Mac OS (для РС-Хакинтош)"); - caps.Categories.AddCategoryMapping(1394, NewznabStandardCategory.PCMac, "|- Программы для просмотра и обработки видео (Mac OS)"); - caps.Categories.AddCategoryMapping(1370, NewznabStandardCategory.PCMac, "|- Программы для создания и обработки графики (Mac OS)"); - caps.Categories.AddCategoryMapping(2237, NewznabStandardCategory.PCMac, "|- Плагины для программ компании Adobe (Mac OS)"); - caps.Categories.AddCategoryMapping(1372, NewznabStandardCategory.PCMac, "|- Аудио редакторы и конвертеры (Mac OS)"); - caps.Categories.AddCategoryMapping(1373, NewznabStandardCategory.PCMac, "|- Системные программы (Mac OS)"); - caps.Categories.AddCategoryMapping(1375, NewznabStandardCategory.PCMac, "|- Офисные программы (Mac OS)"); - caps.Categories.AddCategoryMapping(1371, NewznabStandardCategory.PCMac, "|- Программы для интернета и сетей (Mac OS)"); - caps.Categories.AddCategoryMapping(1374, NewznabStandardCategory.PCMac, "|- Другие программы (Mac OS)"); - caps.Categories.AddCategoryMapping(1933, NewznabStandardCategory.PCMobileiOS, "iOS"); - caps.Categories.AddCategoryMapping(1935, NewznabStandardCategory.PCMobileiOS, "|- Программы для iOS"); - caps.Categories.AddCategoryMapping(1003, NewznabStandardCategory.PCMobileiOS, "|- Игры для iOS"); - caps.Categories.AddCategoryMapping(1937, NewznabStandardCategory.PCMobileiOS, "|- Разное для iOS"); - caps.Categories.AddCategoryMapping(2235, NewznabStandardCategory.PCMobileiOS, "Видео"); - caps.Categories.AddCategoryMapping(1908, NewznabStandardCategory.PCMobileiOS, "|- Фильмы для iPod, iPhone, iPad"); - caps.Categories.AddCategoryMapping(864, NewznabStandardCategory.PCMobileiOS, "|- Сериалы для iPod, iPhone, iPad"); - caps.Categories.AddCategoryMapping(863, NewznabStandardCategory.PCMobileiOS, "|- Мультфильмы для iPod, iPhone, iPad"); - caps.Categories.AddCategoryMapping(2535, NewznabStandardCategory.PCMobileiOS, "|- Аниме для iPod, iPhone, iPad"); - caps.Categories.AddCategoryMapping(2534, NewznabStandardCategory.PCMobileiOS, "|- Музыкальное видео для iPod, iPhone, iPad"); - caps.Categories.AddCategoryMapping(2238, NewznabStandardCategory.PCMac, "Видео HD"); - caps.Categories.AddCategoryMapping(1936, NewznabStandardCategory.PCMac, "|- Фильмы HD для Apple TV"); - caps.Categories.AddCategoryMapping(315, NewznabStandardCategory.PCMac, "|- Сериалы HD для Apple TV"); - caps.Categories.AddCategoryMapping(1363, NewznabStandardCategory.PCMac, "|- Мультфильмы HD для Apple TV"); - caps.Categories.AddCategoryMapping(2082, NewznabStandardCategory.PCMac, "|- Документальное видео HD для Apple TV"); - caps.Categories.AddCategoryMapping(2241, NewznabStandardCategory.PCMac, "|- Музыкальное видео HD для Apple TV"); - caps.Categories.AddCategoryMapping(2236, NewznabStandardCategory.Audio, "Аудио"); - caps.Categories.AddCategoryMapping(1909, NewznabStandardCategory.AudioAudiobook, "|- Аудиокниги (AAC, ALAC)"); - caps.Categories.AddCategoryMapping(1927, NewznabStandardCategory.AudioLossless, "|- Музыка lossless (ALAC)"); - caps.Categories.AddCategoryMapping(2240, NewznabStandardCategory.Audio, "|- Музыка Lossy (AAC-iTunes)"); - caps.Categories.AddCategoryMapping(2248, NewznabStandardCategory.Audio, "|- Музыка Lossy (AAC)"); - caps.Categories.AddCategoryMapping(2244, NewznabStandardCategory.Audio, "|- Музыка Lossy (AAC) (Singles, EPs)"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.OtherMisc, "Разное (раздачи)"); - caps.Categories.AddCategoryMapping(865, NewznabStandardCategory.OtherMisc, "|- Психоактивные аудиопрограммы"); - caps.Categories.AddCategoryMapping(1100, NewznabStandardCategory.OtherMisc, "|- Аватары, Иконки, Смайлы"); - caps.Categories.AddCategoryMapping(1643, NewznabStandardCategory.OtherMisc, "|- Живопись, Графика, Скульптура, Digital Art"); - caps.Categories.AddCategoryMapping(848, NewznabStandardCategory.OtherMisc, "|- Картинки"); - caps.Categories.AddCategoryMapping(808, NewznabStandardCategory.OtherMisc, "|- Любительские фотографии"); - caps.Categories.AddCategoryMapping(630, NewznabStandardCategory.OtherMisc, "|- Обои"); - caps.Categories.AddCategoryMapping(1664, NewznabStandardCategory.OtherMisc, "|- Фото знаменитостей"); - caps.Categories.AddCategoryMapping(148, NewznabStandardCategory.Audio, "|- Аудио"); - caps.Categories.AddCategoryMapping(965, NewznabStandardCategory.AudioMP3, "|- Музыка (lossy)"); - caps.Categories.AddCategoryMapping(134, NewznabStandardCategory.AudioLossless, "|- Музыка (lossless)"); - caps.Categories.AddCategoryMapping(807, NewznabStandardCategory.TVOther, "|- Видео"); - caps.Categories.AddCategoryMapping(147, NewznabStandardCategory.Books, "|- Публикации и учебные материалы (тексты)"); - caps.Categories.AddCategoryMapping(847, NewznabStandardCategory.MoviesOther, "|- Трейлеры и дополнительные материалы к фильмам"); - caps.Categories.AddCategoryMapping(1167, NewznabStandardCategory.TVOther, "|- Любительские видеоклипы"); - caps.Categories.AddCategoryMapping(321, NewznabStandardCategory.Other, "Место встречи изменить - Отчеты о встречах"); - - return caps; - } - - public override object RequestAction(string action, IDictionary query) - { - if (action == "getUrls") - { - var links = IndexerUrls; - - return new - { - options = links.Select(d => new { Value = d, Name = d }) - }; - } - - return null; - } - } - - public class RuTrackerRequestGenerator : IIndexerRequestGenerator - { - public RuTrackerSettings Settings { get; set; } - public IndexerCapabilities Capabilities { get; set; } - - public RuTrackerRequestGenerator() - { - } - - private IEnumerable GetPagedRequests(string term, int[] categories, int season = 0) - { - var searchUrl = string.Format("{0}/forum/tracker.php", Settings.BaseUrl.TrimEnd('/')); - - var queryCollection = new NameValueCollection(); - - var searchString = term; - - // if the search string is empty use the getnew view - if (string.IsNullOrWhiteSpace(searchString)) - { - queryCollection.Add("nm", searchString); - } - else - { - // use the normal search - searchString = searchString.Replace("-", " "); - if (season != 0) - { - searchString += " Сезон: " + season; - } - - queryCollection.Add("nm", searchString); - } - - if (categories != null && categories.Length > 0) - { - queryCollection.Add("f", string.Join(",", Capabilities.Categories.MapTorznabCapsToTrackers(categories))); - } - - searchUrl = searchUrl + "?" + queryCollection.GetQueryString(); - - var request = new IndexerRequest(searchUrl, HttpAccept.Html); - - yield return request; - } - - public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) - { - var pageableRequests = new IndexerPageableRequestChain(); - - pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedSearchTerm), searchCriteria.Categories)); - - return pageableRequests; - } - - public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria) - { - var pageableRequests = new IndexerPageableRequestChain(); - - pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedSearchTerm), searchCriteria.Categories)); - - return pageableRequests; - } - - public IndexerPageableRequestChain GetSearchRequests(TvSearchCriteria searchCriteria) - { - var pageableRequests = new IndexerPageableRequestChain(); - - if (searchCriteria.Season == null) - { - searchCriteria.Season = 0; - } - - pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedSearchTerm), searchCriteria.Categories)); - - return pageableRequests; - } - - public IndexerPageableRequestChain GetSearchRequests(BookSearchCriteria searchCriteria) - { - var pageableRequests = new IndexerPageableRequestChain(); - - pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedSearchTerm), searchCriteria.Categories)); - - return pageableRequests; - } - - public IndexerPageableRequestChain GetSearchRequests(BasicSearchCriteria searchCriteria) - { - var pageableRequests = new IndexerPageableRequestChain(); - - pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedSearchTerm), searchCriteria.Categories)); - - return pageableRequests; - } - - public Func> GetCookies { get; set; } - public Action, DateTime?> CookiesUpdater { get; set; } - } - - public class RuTrackerParser : IParseIndexerResponse - { - private readonly RuTrackerSettings _settings; - private readonly IndexerCapabilitiesCategories _categories; - - public RuTrackerParser(RuTrackerSettings settings, IndexerCapabilitiesCategories categories) - { - _settings = settings; - _categories = categories; - } - - public IList ParseResponse(IndexerResponse indexerResponse) - { - var torrentInfos = new List(); - - var parser = new HtmlParser(); - var doc = parser.ParseDocument(indexerResponse.Content); - var rows = doc.QuerySelectorAll("table#tor-tbl > tbody > tr"); - - foreach (var row in rows) - { - var release = ParseReleaseRow(row); - if (release != null) - { - torrentInfos.Add(release); - } - } - - return torrentInfos.ToArray(); - } - - private TorrentInfo ParseReleaseRow(IElement row) - { - var qDownloadLink = row.QuerySelector("td.tor-size > a.tr-dl"); - - // Expects moderation - if (qDownloadLink == null) - { - return null; - } - - var link = _settings.BaseUrl + "forum/" + qDownloadLink.GetAttribute("href"); - - var qDetailsLink = row.QuerySelector("td.t-title-col > div.t-title > a.tLink"); - var details = _settings.BaseUrl + "forum/" + qDetailsLink.GetAttribute("href"); - - var category = GetCategoryOfRelease(row); - - var size = GetSizeOfRelease(row); - - var seeders = GetSeedersOfRelease(row); - var leechers = ParseUtil.CoerceInt(row.QuerySelector("td:nth-child(8)").TextContent); - - var grabs = ParseUtil.CoerceInt(row.QuerySelector("td:nth-child(9)").TextContent); - - var publishDate = GetPublishDateOfRelease(row); - - var release = new TorrentInfo - { - MinimumRatio = 1, - MinimumSeedTime = 0, - Title = qDetailsLink.TextContent, - InfoUrl = details, - DownloadUrl = link, - Guid = details, - Size = size, - Seeders = seeders, - Peers = leechers + seeders, - Grabs = grabs, - PublishDate = publishDate, - Categories = category, - DownloadVolumeFactor = 1, - UploadVolumeFactor = 1 - }; - - // TODO finish extracting release variables to simplify release initialization - if (IsAnyTvCategory(release.Categories)) - { - // extract season and episodes - // should also handle multi-season releases listed as Сезон: 1-8 and Сезоны: 1-8 - var regex = new Regex(@".+\/\s([^а-яА-я\/]+)\s\/.+Сезон.\s*[:]*\s+(\d*\-?\d*).+(?:Серии|Эпизод)+\s*[:]*\s+(\d+-?\d*).+(\[.*\])[\s]?(.*)"); - - var title = regex.Replace(release.Title, "$1 - S$2E$3 - rus $4 $5"); - title = Regex.Replace(title, "-Rip", "Rip", RegexOptions.IgnoreCase); - title = Regex.Replace(title, "WEB-DLRip", "WEBDL", RegexOptions.IgnoreCase); - title = Regex.Replace(title, "WEB-DL", "WEBDL", RegexOptions.IgnoreCase); - title = Regex.Replace(title, "HDTVRip", "HDTV", RegexOptions.IgnoreCase); - title = Regex.Replace(title, "Кураж-Бамбей", "kurazh", RegexOptions.IgnoreCase); - - release.Title = title; - } - else if (IsAnyMovieCategory(release.Categories)) - { - // Bluray quality fix: radarr parse Blu-ray Disc as Bluray-1080p but should be BR-DISK - release.Title = Regex.Replace(release.Title, "Blu-ray Disc", "BR-DISK", RegexOptions.IgnoreCase); - } - - if (IsAnyTvCategory(release.Categories) | IsAnyMovieCategory(release.Categories)) - { - // remove director's name from title - // rutracker movies titles look like: russian name / english name (russian director / english director) other stuff - // Ирландец / The Irishman (Мартин Скорсезе / Martin Scorsese) [2019, США, криминал, драма, биография, WEB-DL 1080p] Dub (Пифагор) + MVO (Jaskier) + AVO (Юрий Сербин) + Sub Rus, Eng + Original Eng - // this part should be removed: (Мартин Скорсезе / Martin Scorsese) - //var director = new Regex(@"(\([А-Яа-яЁё\W]+)\s/\s(.+?)\)"); - var director = new Regex(@"(\([А-Яа-яЁё\W].+?\))"); - release.Title = director.Replace(release.Title, ""); - - // Remove VO, MVO and DVO from titles - var vo = new Regex(@".VO\s\(.+?\)"); - release.Title = vo.Replace(release.Title, ""); - - // Remove R5 and (R5) from release names - var r5 = new Regex(@"(.*)(.R5.)(.*)"); - release.Title = r5.Replace(release.Title, "$1"); - - // Remove Sub languages from release names - var sub = new Regex(@"(Sub.*\+)|(Sub.*$)"); - release.Title = sub.Replace(release.Title, ""); - - // language fix: all rutracker releases contains russian track - if (release.Title.IndexOf("rus", StringComparison.OrdinalIgnoreCase) < 0) - { - release.Title += " rus"; - } - - // remove russian letters - if (_settings.RussianLetters == true) - { - //Strip russian letters - var rusRegex = new Regex(@"(\([А-Яа-яЁё\W]+\))|(^[А-Яа-яЁё\W\d]+\/ )|([а-яА-ЯЁё \-]+,+)|([а-яА-ЯЁё]+)"); - - release.Title = rusRegex.Replace(release.Title, ""); - - // Replace everything after first forward slash with a year (to avoid filtering away releases with an fwdslash after title+year, like: Title Year [stuff / stuff]) - var fwdslashRegex = new Regex(@"(\/\s.+?\[)"); - release.Title = fwdslashRegex.Replace(release.Title, "["); - } - } - - return release; - } - - private int GetSeedersOfRelease(in IElement row) - { - var seeders = 0; - var qSeeders = row.QuerySelector("td:nth-child(7)"); - if (qSeeders != null && !qSeeders.TextContent.Contains("дн")) - { - var seedersString = qSeeders.QuerySelector("b").TextContent; - if (!string.IsNullOrWhiteSpace(seedersString)) - { - seeders = ParseUtil.CoerceInt(seedersString); - } - } - - return seeders; - } - - private ICollection GetCategoryOfRelease(in IElement row) - { - var forum = row.QuerySelector("td.f-name-col > div.f-name > a"); - var forumid = forum.GetAttribute("href").Split('=')[1]; - return _categories.MapTrackerCatToNewznab(forumid); - } - - private long GetSizeOfRelease(in IElement row) - { - var qSize = row.QuerySelector("td.tor-size"); - var size = ParseUtil.GetBytes(qSize.GetAttribute("data-ts_text")); - return size; - } - - private DateTime GetPublishDateOfRelease(in IElement row) - { - var timestr = row.QuerySelector("td:nth-child(10)").GetAttribute("data-ts_text"); - var publishDate = DateTimeUtil.UnixTimestampToDateTime(long.Parse(timestr)); - return publishDate; - } - - private bool IsAnyTvCategory(ICollection category) - { - return category.Contains(NewznabStandardCategory.TV) - || NewznabStandardCategory.TV.SubCategories.Any(subCat => category.Contains(subCat)); - } - - private bool IsAnyMovieCategory(ICollection category) - { - return category.Contains(NewznabStandardCategory.Movies) - || NewznabStandardCategory.Movies.SubCategories.Any(subCat => category.Contains(subCat)); - } - - public Action, DateTime?> CookiesUpdater { get; set; } - } - - public class RuTrackerSettings : UserPassTorrentBaseSettings - { - public RuTrackerSettings() - { - RussianLetters = false; - } - - [FieldDefinition(4, Label = "Strip Russian letters", Type = FieldType.Checkbox, SelectOptionsProviderAction = "stripRussian", HelpText = "Removes russian letters")] - public bool RussianLetters { get; set; } - } -} diff --git a/src/NzbDrone.Core/Indexers/Definitions/SceneHD.cs b/src/NzbDrone.Core/Indexers/Definitions/SceneHD.cs index 28c479133..655c94f83 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SceneHD.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SceneHD.cs @@ -14,6 +14,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -24,16 +25,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class SceneHD : TorrentIndexerBase { public override string Name => "SceneHD"; - public override string[] IndexerUrls => new[] { "https://scenehd.org/" }; - public override string Description => "SceneHD is Private site for HD TV / MOVIES"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public SceneHD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public SceneHD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -51,40 +46,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.MoviesUHD, "Movie/2160"); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesHD, "Movie/1080"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.MoviesHD, "Movie/720"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.MoviesBluRay, "Movie/BD5/9"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.TVUHD, "TV/2160"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVHD, "TV/1080"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.TVHD, "TV/720"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.MoviesBluRay, "Bluray/Complete"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.XXX, "XXX"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.MoviesOther, "Subpacks"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.AudioVideo, "MVID"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.Other, "Other"); - - return caps; - } } public class SceneHDRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/SceneTime.cs b/src/NzbDrone.Core/Indexers/Definitions/SceneTime.cs index 13f8dab30..401d3f309 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SceneTime.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SceneTime.cs @@ -13,6 +13,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -23,16 +24,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class SceneTime : TorrentIndexerBase { public override string Name => "SceneTime"; - public override string[] IndexerUrls => new[] { "https://www.scenetime.com/" }; - public override string Description => "Always on time"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.GetEncoding("iso-8859-1"); public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public SceneTime(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public SceneTime(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -50,61 +45,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return CookieUtil.CookieHeaderToDictionary(Settings.Cookie); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.XXX, "Movies Adult"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.Movies, "Movie Packs"); - caps.Categories.AddCategoryMapping(57, NewznabStandardCategory.MoviesSD, "Movies SD"); - caps.Categories.AddCategoryMapping(59, NewznabStandardCategory.MoviesHD, "Movies HD"); - caps.Categories.AddCategoryMapping(64, NewznabStandardCategory.Movies3D, "Movies 3D"); - caps.Categories.AddCategoryMapping(82, NewznabStandardCategory.MoviesOther, "Movies CAM-TS"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.MoviesUHD, "Movies UHD"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVUHD, "TV UHD"); - caps.Categories.AddCategoryMapping(43, NewznabStandardCategory.TV, "TV Packs"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.TVHD, "TV HD"); - caps.Categories.AddCategoryMapping(77, NewznabStandardCategory.TVSD, "TV SD"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.PCGames, "Games PC ISO"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.ConsoleXBox, "Games XBOX"); - caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.ConsoleWii, "Games Wii"); - caps.Categories.AddCategoryMapping(55, NewznabStandardCategory.ConsoleNDS, "Games Nintendo DS"); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.ConsolePS4, "Games/PS"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.ConsoleOther, "Games Dreamcast"); - caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.PCMac, "Mac/Linux"); - caps.Categories.AddCategoryMapping(53, NewznabStandardCategory.PC0day, "Apps"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.PCMobileOther, "Mobile Apps"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.Books, "Books and Magazines"); - caps.Categories.AddCategoryMapping(65, NewznabStandardCategory.BooksComics, "Books Comic"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping(116, NewznabStandardCategory.Audio, "Music Pack"); - - caps.Flags = new List - { - IndexerFlag.FreeLeech - }; - - return caps; - } } public class SceneTimeRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/SecretCinema.cs b/src/NzbDrone.Core/Indexers/Definitions/SecretCinema.cs index afa3927a4..4641e4954 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SecretCinema.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SecretCinema.cs @@ -16,6 +16,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Gazelle; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -26,14 +27,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class SecretCinema : Gazelle.Gazelle { public override string Name => "Secret Cinema"; - public override string[] IndexerUrls => new string[] { "https://secret-cinema.pw/" }; - public override string Description => "A tracker for rare movies."; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public SecretCinema(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public SecretCinema(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -42,26 +39,6 @@ namespace NzbDrone.Core.Indexers.Definitions return new SecretCinemaParser(Settings, Capabilities); } - protected override IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q, MusicSearchParam.Album, MusicSearchParam.Artist, MusicSearchParam.Label, MusicSearchParam.Year - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies, "Movies"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.Audio, "Music"); - - return caps; - } - public class SecretCinemaParser : IParseIndexerResponse { protected readonly GazelleSettings _settings; diff --git a/src/NzbDrone.Core/Indexers/Definitions/Shizaproject.cs b/src/NzbDrone.Core/Indexers/Definitions/Shizaproject.cs index 573514c60..027231f43 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Shizaproject.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Shizaproject.cs @@ -12,6 +12,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -22,16 +23,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class Shizaproject : TorrentIndexerBase { public override string Name => "ShizaProject"; - public override string[] IndexerUrls => new string[] { "https://shiza-project.com/" }; - public override string Description => "Shizaproject is russian anime voiceover group and eponymous anime tracker."; - public override string Language => "ru-RU"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Public; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public Shizaproject(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Shizaproject(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -44,28 +39,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return new ShizaprojectParser(Settings, Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime, "TV"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVAnime, "TV_SPECIAL"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TVAnime, "ONA"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVAnime, "OVA"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Movies, "MOVIE"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.Movies, "SHORT_MOVIE"); - return caps; - } } public class ShizaprojectRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs b/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs index d4b696246..1c83ba16b 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SpeedApp.cs @@ -18,6 +18,7 @@ using NzbDrone.Core.Exceptions; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -30,28 +31,16 @@ namespace NzbDrone.Core.Indexers.Definitions { public override string Name => "SpeedApp.io"; - public override string[] IndexerUrls => new string[] { "https://speedapp.io" }; - private string ApiUrl => $"{Settings.BaseUrl}/api"; private string LoginUrl => $"{ApiUrl}/login"; - public override string Description => "SpeedApp is a ROMANIAN Private Torrent Tracker for MOVIES / TV / GENERAL"; - - public override string Language => "ro-RO"; - - public override Encoding Encoding => Encoding.UTF8; - public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - - public override IndexerCapabilities Capabilities => SetCapabilities(); - private IIndexerRepository _indexerRepository; - public SpeedApp(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger, IIndexerRepository indexerRepository) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public SpeedApp(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger, IIndexerRepository indexerRepository) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { _indexerRepository = indexerRepository; } @@ -180,78 +169,6 @@ namespace NzbDrone.Core.Indexers.Definitions return torrentData; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, - TvSearchParam.Season, - TvSearchParam.Ep, - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, - MovieSearchParam.ImdbId, - }, - MusicSearchParams = new List - { - MusicSearchParam.Q, - }, - BookSearchParams = new List - { - BookSearchParam.Q, - }, - }; - - caps.Categories.AddCategoryMapping(38, NewznabStandardCategory.Movies, "Movie Packs"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.MoviesSD, "Movies: SD"); - caps.Categories.AddCategoryMapping(35, NewznabStandardCategory.MoviesSD, "Movies: SD Ro"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.MoviesHD, "Movies: HD"); - caps.Categories.AddCategoryMapping(29, NewznabStandardCategory.MoviesHD, "Movies: HD Ro"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.MoviesDVD, "Movies: DVD"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.MoviesDVD, "Movies: DVD Ro"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.MoviesBluRay, "Movies: BluRay"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.MoviesBluRay, "Movies: BluRay Ro"); - caps.Categories.AddCategoryMapping(59, NewznabStandardCategory.Movies, "Movies: Ro"); - caps.Categories.AddCategoryMapping(57, NewznabStandardCategory.MoviesUHD, "Movies: 4K (2160p) Ro"); - caps.Categories.AddCategoryMapping(61, NewznabStandardCategory.MoviesUHD, "Movies: 4K (2160p)"); - caps.Categories.AddCategoryMapping(41, NewznabStandardCategory.TV, "TV Packs"); - caps.Categories.AddCategoryMapping(66, NewznabStandardCategory.TV, "TV Packs Ro"); - caps.Categories.AddCategoryMapping(45, NewznabStandardCategory.TVSD, "TV Episodes"); - caps.Categories.AddCategoryMapping(46, NewznabStandardCategory.TVSD, "TV Episodes Ro"); - caps.Categories.AddCategoryMapping(43, NewznabStandardCategory.TVHD, "TV Episodes HD"); - caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.TVHD, "TV Episodes HD Ro"); - caps.Categories.AddCategoryMapping(60, NewznabStandardCategory.TV, "TV Ro"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.PCGames, "Games: PC-ISO"); - caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.Console, "Games: Console"); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.PC0day, "Applications"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.PC, "Applications: Linux"); - caps.Categories.AddCategoryMapping(37, NewznabStandardCategory.PCMac, "Applications: Mac"); - caps.Categories.AddCategoryMapping(19, NewznabStandardCategory.PCMobileOther, "Applications: Mobile"); - caps.Categories.AddCategoryMapping(62, NewznabStandardCategory.TV, "TV Cartoons"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TVAnime, "TV Anime / Hentai"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.BooksEBook, "E-books"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.Audio, "Music"); - caps.Categories.AddCategoryMapping(64, NewznabStandardCategory.AudioVideo, "Music Video"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.Other, "Images"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.TVSport, "TV Sports"); - caps.Categories.AddCategoryMapping(58, NewznabStandardCategory.TVSport, "TV Sports Ro"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.TVDocumentary, "TV Documentary"); - caps.Categories.AddCategoryMapping(63, NewznabStandardCategory.TVDocumentary, "TV Documentary Ro"); - caps.Categories.AddCategoryMapping(65, NewznabStandardCategory.Other, "Tutorial"); - caps.Categories.AddCategoryMapping(67, NewznabStandardCategory.OtherMisc, "Miscellaneous"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.XXX, "XXX Movies"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.XXX, "XXX DVD"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.XXX, "XXX HD"); - caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.XXXImageSet, "XXX Images"); - caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.XXX, "XXX Packs"); - caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.XXX, "XXX SD"); - - return caps; - } } public class SpeedAppRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/SpeedCD.cs b/src/NzbDrone.Core/Indexers/Definitions/SpeedCD.cs index dac4e810b..1730dfca9 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SpeedCD.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SpeedCD.cs @@ -16,6 +16,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -26,22 +27,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class SpeedCD : TorrentIndexerBase { public override string Name => "SpeedCD"; - public override string[] IndexerUrls => new string[] - { - "https://speed.cd/", - "https://speed.click/", - "https://speeders.me/" - }; - - public override string Description => "Your home now!"; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public SpeedCD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public SpeedCD(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -120,64 +109,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesOther, "Movies/XviD"); - caps.Categories.AddCategoryMapping(42, NewznabStandardCategory.Movies, "Movies/Packs"); - caps.Categories.AddCategoryMapping(32, NewznabStandardCategory.Movies, "Movies/Kids"); - caps.Categories.AddCategoryMapping(43, NewznabStandardCategory.MoviesHD, "Movies/HD"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.Movies, "Movies/DiVERSiTY"); - caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.MoviesBluRay, "Movies/B-Ray"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.Movies3D, "Movies/3D"); - caps.Categories.AddCategoryMapping(40, NewznabStandardCategory.MoviesDVD, "Movies/DVD-R"); - caps.Categories.AddCategoryMapping(56, NewznabStandardCategory.Movies, "Movies/Anime"); - caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.TVSport, "TV/Sports"); - caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.TVHD, "TV/B-Ray"); - caps.Categories.AddCategoryMapping(53, NewznabStandardCategory.TVSD, "TV/DVD-R"); - caps.Categories.AddCategoryMapping(41, NewznabStandardCategory.TV, "TV/Packs"); - caps.Categories.AddCategoryMapping(55, NewznabStandardCategory.TV, "TV/Kids"); - caps.Categories.AddCategoryMapping(57, NewznabStandardCategory.TV, "TV/DiVERSiTY"); - caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.TVHD, "TV/HD"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVSD, "TV/Episodes"); - caps.Categories.AddCategoryMapping(30, NewznabStandardCategory.TVAnime, "TV/Anime"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.PCISO, "Games/PC ISO"); - caps.Categories.AddCategoryMapping(39, NewznabStandardCategory.ConsoleWii, "Games/Wii"); - caps.Categories.AddCategoryMapping(45, NewznabStandardCategory.ConsolePS3, "Games/PS3"); - caps.Categories.AddCategoryMapping(35, NewznabStandardCategory.Console, "Games/Nintendo"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.ConsoleXBox360, "Games/XboX360"); - caps.Categories.AddCategoryMapping(46, NewznabStandardCategory.PCMobileOther, "Mobile"); - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.PC0day, "Apps/0DAY"); - caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.PCMac, "Mac"); - caps.Categories.AddCategoryMapping(54, NewznabStandardCategory.Books, "Educational"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.Books, "Books-Mags"); - caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.Audio, "Music/Audio"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Audio, "Music/Flac"); - caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.Audio, "Music/Pack"); - caps.Categories.AddCategoryMapping(29, NewznabStandardCategory.AudioVideo, "Music/Video"); - - return caps; - } } public class SpeedCDRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs b/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs index 969c65b7e..7c2ad6112 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/SubsPlease.cs @@ -13,6 +13,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -23,20 +24,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class SubsPlease : TorrentIndexerBase { public override string Name => "SubsPlease"; - public override string[] IndexerUrls => new[] - { - "https://subsplease.org/", - "https://subsplease.nocensor.space/" - }; - public override string Language => "en-US"; - public override string Description => "SubsPlease - A better HorribleSubs/Erai replacement"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Public; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public SubsPlease(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public SubsPlease(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -49,21 +40,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return new SubsPleaseParser(Settings, Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime, "Anime"); - - return caps; - } } public class SubsPleaseRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/TVVault.cs b/src/NzbDrone.Core/Indexers/Definitions/TVVault.cs index 01f3359ba..a106817f6 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TVVault.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TVVault.cs @@ -17,6 +17,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -28,18 +29,12 @@ namespace NzbDrone.Core.Indexers.Definitions public class TVVault : TorrentIndexerBase { public override string Name => "TVVault"; - public override string[] IndexerUrls => new[] { "https://tv-vault.me/" }; private string LoginUrl => Settings.BaseUrl + "login.php"; - public override string Description => "TV-Vault is a very unique tracker dedicated for old TV shows, TV movies and documentaries."; - public override string Language => "en-US"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); public override TimeSpan RateLimit => TimeSpan.FromSeconds(5); - public TVVault(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public TVVault(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -107,32 +102,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - Flags = new List - { - IndexerFlag.FreeLeech - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TV); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.Movies); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.TVHD); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.TVSD); - - return caps; - } } public class TVVaultRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentDay.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentDay.cs index 22d136e9a..dc394b37d 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentDay.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentDay.cs @@ -10,6 +10,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -21,26 +22,10 @@ namespace NzbDrone.Core.Indexers.Definitions { public override string Name => "TorrentDay"; - public override string[] IndexerUrls => new string[] - { - "https://torrentday.cool/", - "https://tday.love/", - "https://secure.torrentday.com/", - "https://classic.torrentday.com/", - "https://www.torrentday.com/", - "https://torrentday.it/", - "https://td.findnemo.net/", - "https://td.getcrazy.me/", - "https://td.venom.global/", - "https://td.workisboring.net/" - }; - public override string Description => "TorrentDay (TD) is a Private site for TV / MOVIES / GENERAL"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public TorrentDay(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public TorrentDay(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -58,79 +43,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return CookieUtil.CookieHeaderToDictionary(Settings.Cookie); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(29, NewznabStandardCategory.TVAnime, "Anime"); - caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.PC, "Appz/Packs"); - caps.Categories.AddCategoryMapping(42, NewznabStandardCategory.AudioAudiobook, "Audio Books"); - caps.Categories.AddCategoryMapping(20, NewznabStandardCategory.Books, "Books"); - caps.Categories.AddCategoryMapping(30, NewznabStandardCategory.TVDocumentary, "Documentary"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.Other, "Fonts"); - caps.Categories.AddCategoryMapping(43, NewznabStandardCategory.PCMac, "Mac"); - - caps.Categories.AddCategoryMapping(96, NewznabStandardCategory.MoviesUHD, "Movie/4K"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.MoviesSD, "Movies/480p"); - caps.Categories.AddCategoryMapping(11, NewznabStandardCategory.MoviesBluRay, "Movies/Bluray"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.MoviesBluRay, "Movies/Bluray-Full"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.MoviesDVD, "Movies/DVD-R"); - caps.Categories.AddCategoryMapping(21, NewznabStandardCategory.MoviesSD, "Movies/MP4"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.MoviesForeign, "Movies/Non-English"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.Movies, "Movies/Packs"); - caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.MoviesSD, "Movies/SD/x264"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.Movies, "Movies/x265"); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesSD, "Movies/XviD"); - - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.AudioMP3, "Music/Audio"); - caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.AudioForeign, "Music/Non-English"); - caps.Categories.AddCategoryMapping(41, NewznabStandardCategory.Audio, "Music/Packs"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.AudioVideo, "Music/Video"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.Audio, "Music/Flac"); - - caps.Categories.AddCategoryMapping(45, NewznabStandardCategory.AudioOther, "Podcast"); - - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.PCGames, "PC/Games"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.ConsolePS3, "PS3"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.ConsolePSP, "PSP"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.ConsoleWii, "Wii"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.ConsoleXBox360, "Xbox-360"); - - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.TVSD, "TV/480p"); - caps.Categories.AddCategoryMapping(32, NewznabStandardCategory.TVHD, "TV/Bluray"); - caps.Categories.AddCategoryMapping(31, NewznabStandardCategory.TVSD, "TV/DVD-R"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.TVSD, "TV/DVD-Rip"); - caps.Categories.AddCategoryMapping(46, NewznabStandardCategory.TVSD, "TV/Mobile"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.TV, "TV/Packs"); - caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.TVSD, "TV/SD/x264"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.TVHD, "TV/x264"); - caps.Categories.AddCategoryMapping(34, NewznabStandardCategory.TVUHD, "TV/x265"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TVSD, "TV/XviD"); - - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.XXX, "XXX/Movies"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.XXXPack, "XXX/Packs"); - - return caps; - } } public class TorrentDayRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs index c6367c099..e2d5f0660 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs @@ -2,6 +2,7 @@ using System; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.TorrentPotato @@ -16,8 +17,8 @@ namespace NzbDrone.Core.Indexers.TorrentPotato public override IndexerPrivacy Privacy => IndexerPrivacy.Private; public override TimeSpan RateLimit => TimeSpan.FromSeconds(2); - public TorrentPotato(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public TorrentPotato(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentSyndikat.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentSyndikat.cs index 05585779b..a1bb2b365 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentSyndikat.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentSyndikat.cs @@ -12,6 +12,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -22,16 +23,10 @@ namespace NzbDrone.Core.Indexers.Definitions public class TorrentSyndikat : TorrentIndexerBase { public override string Name => "TorrentSyndikat"; - public override string[] IndexerUrls => new[] { "https://torrent-syndikat.org/" }; - public override string Description => "A German general tracker"; - public override string Language => "de-DE"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public TorrentSyndikat(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public TorrentSyndikat(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -44,76 +39,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return new TorrentSyndikatParser(Settings, Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q, MovieSearchParam.ImdbId - }, - MusicSearchParams = new List - { - MusicSearchParam.Q - }, - BookSearchParams = new List - { - BookSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PC, "Apps / Windows"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.PC, "Apps / Linux"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.PCMac, "Apps / MacOS"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.PC, "Apps / Misc"); - - caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.PCGames, "Spiele / Windows"); - caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.PCGames, "Spiele / MacOS"); - caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.PCGames, "Spiele / Linux"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.ConsoleOther, "Spiele / Playstation"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.ConsoleOther, "Spiele / Nintendo"); - caps.Categories.AddCategoryMapping(32, NewznabStandardCategory.ConsoleOther, "Spiele / XBOX"); - - caps.Categories.AddCategoryMapping(42, NewznabStandardCategory.MoviesUHD, "Filme / 2160p"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.MoviesHD, "Filme / 1080p"); - caps.Categories.AddCategoryMapping(20, NewznabStandardCategory.MoviesHD, "Filme / 720p"); - caps.Categories.AddCategoryMapping(10, NewznabStandardCategory.MoviesSD, "Filme / SD"); - - caps.Categories.AddCategoryMapping(43, NewznabStandardCategory.TVUHD, "Serien / 2160p"); - caps.Categories.AddCategoryMapping(53, NewznabStandardCategory.TVHD, "Serien / 1080p"); - caps.Categories.AddCategoryMapping(54, NewznabStandardCategory.TVHD, "Serien / 720p"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.TVSD, "Serien / SD"); - caps.Categories.AddCategoryMapping(30, NewznabStandardCategory.TVSport, "Serien / Sport"); - - caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.TVUHD, "Serienpacks / 2160p"); - caps.Categories.AddCategoryMapping(55, NewznabStandardCategory.TVHD, "Serienpacks / 1080p"); - caps.Categories.AddCategoryMapping(56, NewznabStandardCategory.TVHD, "Serienpacks / 720p"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.TVSD, "Serienpacks / SD"); - - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.AudioLossless, "Audio / Musik / FLAC"); - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.AudioMP3, "Audio / Musik / MP3"); - caps.Categories.AddCategoryMapping(35, NewznabStandardCategory.AudioOther, "Audio / Other"); - caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.AudioAudiobook, "Audio / aBooks"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.AudioVideo, "Audio / Videos"); - - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.Books, "Misc / eBooks"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.PCMobileOther, "Misc / Mobile"); - caps.Categories.AddCategoryMapping(39, NewznabStandardCategory.Other, "Misc / Bildung"); - - caps.Categories.AddCategoryMapping(36, NewznabStandardCategory.TVForeign, "Englisch / Serien"); - caps.Categories.AddCategoryMapping(57, NewznabStandardCategory.TVForeign, "Englisch / Serienpacks"); - caps.Categories.AddCategoryMapping(37, NewznabStandardCategory.MoviesForeign, "Englisch / Filme"); - caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.Books, "Englisch / eBooks"); - caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.Other, "Englisch / Bildung"); - caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.TVSport, "Englisch / Sport"); - - return caps; - } } public class TorrentSyndikatRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentsCSV.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentsCSV.cs index 9daddda0c..d63c54ee1 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentsCSV.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentsCSV.cs @@ -11,6 +11,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -21,17 +22,12 @@ namespace NzbDrone.Core.Indexers.Definitions public class TorrentsCSV : TorrentIndexerBase { public override string Name => "TorrentsCSV"; - public override string[] IndexerUrls => new[] { "https://torrents-csv.ml/" }; - public override string Language => "en-US"; - public override string Description => "Torrents.csv is a self-hostable open source torrent search engine and database"; public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Public; - public override IndexerCapabilities Capabilities => SetCapabilities(); public override bool SupportsRss => false; - public TorrentsCSV(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public TorrentsCSV(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -44,25 +40,6 @@ namespace NzbDrone.Core.Indexers.Definitions { return new TorrentsCSVParser(Settings); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Other); - - return caps; - } } public class TorrentsCSVRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/Definitions/Torznab/Torznab.cs b/src/NzbDrone.Core/Indexers/Definitions/Torznab/Torznab.cs index 47d9584ff..3ca5b31fd 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Torznab/Torznab.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Torznab/Torznab.cs @@ -8,6 +8,7 @@ using NzbDrone.Common.Extensions; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Newznab; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.ThingiProvider; using NzbDrone.Core.Validation; @@ -94,8 +95,8 @@ namespace NzbDrone.Core.Indexers.Torznab } } - public Torznab(INewznabCapabilitiesProvider capabilitiesProvider, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public Torznab(INewznabCapabilitiesProvider capabilitiesProvider, IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { _capabilitiesProvider = capabilitiesProvider; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/UNIT3D/Unit3dBase.cs b/src/NzbDrone.Core/Indexers/Definitions/UNIT3D/Unit3dBase.cs index c5e17194c..22693ef4d 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/UNIT3D/Unit3dBase.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/UNIT3D/Unit3dBase.cs @@ -1,12 +1,14 @@ using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions.UNIT3D { - public abstract class Unit3dBase : TorrentIndexerBase + public class Unit3dBase : TorrentIndexerBase { + public override string Name => "Unit3d"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; public override string[] IndexerUrls => new string[] { "" }; public override bool SupportsRss => true; @@ -17,9 +19,10 @@ namespace NzbDrone.Core.Indexers.Definitions.UNIT3D public Unit3dBase(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } diff --git a/src/NzbDrone.Core/Indexers/Definitions/Xthor/Xthor.cs b/src/NzbDrone.Core/Indexers/Definitions/Xthor/Xthor.cs index 373aab7f1..c1836f3c0 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Xthor/Xthor.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Xthor/Xthor.cs @@ -4,6 +4,7 @@ using System.Text; using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers.Definitions.Xthor @@ -12,22 +13,17 @@ namespace NzbDrone.Core.Indexers.Definitions.Xthor public class Xthor : TorrentIndexerBase { public override string Name => "Xthor"; - public override string[] IndexerUrls => new string[] { "https://api.xthor.tk/" }; - public override string Language => "fr-FR"; - public override string Description => "Xthor is a general Private torrent site"; - public override Encoding Encoding => Encoding.GetEncoding("windows-1252"); public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; public override TimeSpan RateLimit => TimeSpan.FromSeconds(2.5); - public override IndexerCapabilities Capabilities => SetCapabilities(); public Xthor(IIndexerHttpClient httpClient, - IEventAggregator eventAggregator, - IIndexerStatusService indexerStatusService, - IConfigService configService, - Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + IEventAggregator eventAggregator, + IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, + IConfigService configService, + Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -40,86 +36,5 @@ namespace NzbDrone.Core.Indexers.Definitions.Xthor { return new XthorParser(Settings, Capabilities.Categories); } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List { TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep }, - MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.TmdbId }, - MusicSearchParams = new List { MusicSearchParam.Q }, - BookSearchParams = new List { BookSearchParam.Q } - }; - - caps.Categories.AddCategoryMapping(118, NewznabStandardCategory.MoviesBluRay, "Films 2160p/Bluray"); - caps.Categories.AddCategoryMapping(119, NewznabStandardCategory.MoviesBluRay, "Films 2160p/Remux"); - caps.Categories.AddCategoryMapping(107, NewznabStandardCategory.MoviesUHD, "Films 2160p/x265"); - caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.MoviesBluRay, "Films 1080p/BluRay"); - caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.MoviesBluRay, "Films 1080p/Remux"); - caps.Categories.AddCategoryMapping(100, NewznabStandardCategory.MoviesHD, "Films 1080p/x265"); - caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.MoviesHD, "Films 1080p/x264"); - caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.MoviesHD, "Films 720p/x264"); - caps.Categories.AddCategoryMapping(7, NewznabStandardCategory.MoviesSD, "Films SD/x264"); - caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Movies3D, "Films 3D"); - caps.Categories.AddCategoryMapping(6, NewznabStandardCategory.MoviesSD, "Films XviD"); - caps.Categories.AddCategoryMapping(8, NewznabStandardCategory.MoviesDVD, "Films DVD"); - caps.Categories.AddCategoryMapping(122, NewznabStandardCategory.MoviesHD, "Films HDTV"); - caps.Categories.AddCategoryMapping(94, NewznabStandardCategory.MoviesWEBDL, "Films WEBDL"); - caps.Categories.AddCategoryMapping(95, NewznabStandardCategory.MoviesWEBDL, "Films WEBRiP"); - caps.Categories.AddCategoryMapping(12, NewznabStandardCategory.TVDocumentary, "Films Documentaire"); - caps.Categories.AddCategoryMapping(31, NewznabStandardCategory.MoviesOther, "Films Animation"); - caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.MoviesOther, "Films Spectacle"); - caps.Categories.AddCategoryMapping(125, NewznabStandardCategory.TVSport, "Films Sports"); - caps.Categories.AddCategoryMapping(20, NewznabStandardCategory.AudioVideo, "Films Concerts, Clips"); - caps.Categories.AddCategoryMapping(9, NewznabStandardCategory.MoviesOther, "Films VOSTFR"); - - // TV / Series - caps.Categories.AddCategoryMapping(104, NewznabStandardCategory.TVOther, "Series BluRay"); - caps.Categories.AddCategoryMapping(13, NewznabStandardCategory.TVOther, "Series Pack VF"); - caps.Categories.AddCategoryMapping(15, NewznabStandardCategory.TVHD, "Series HD VF"); - caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.TVSD, "Series SD VF"); - caps.Categories.AddCategoryMapping(98, NewznabStandardCategory.TVOther, "Series Pack VOSTFR"); - caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.TVHD, "Series HD VOSTFR"); - caps.Categories.AddCategoryMapping(16, NewznabStandardCategory.TVSD, "Series SD VOSTFR"); - caps.Categories.AddCategoryMapping(101, NewznabStandardCategory.TVAnime, "Series Packs Anime"); - caps.Categories.AddCategoryMapping(32, NewznabStandardCategory.TVAnime, "Series Animes"); - caps.Categories.AddCategoryMapping(110, NewznabStandardCategory.TVAnime, "Series Anime VOSTFR"); - caps.Categories.AddCategoryMapping(123, NewznabStandardCategory.TVOther, "Series Animation"); - caps.Categories.AddCategoryMapping(109, NewznabStandardCategory.TVDocumentary, "Series DOC"); - caps.Categories.AddCategoryMapping(34, NewznabStandardCategory.TVOther, "Series Sport"); - caps.Categories.AddCategoryMapping(30, NewznabStandardCategory.TVOther, "Series Emission TV"); - - // XxX / MISC - caps.Categories.AddCategoryMapping(36, NewznabStandardCategory.XXX, "MISC XxX/Films"); - caps.Categories.AddCategoryMapping(105, NewznabStandardCategory.XXX, "MISC XxX/Séries"); - caps.Categories.AddCategoryMapping(114, NewznabStandardCategory.XXX, "MISC XxX/Lesbiennes"); - caps.Categories.AddCategoryMapping(115, NewznabStandardCategory.XXX, "MISC XxX/Gays"); - caps.Categories.AddCategoryMapping(113, NewznabStandardCategory.XXX, "MISC XxX/Hentai"); - caps.Categories.AddCategoryMapping(120, NewznabStandardCategory.XXX, "MISC XxX/Magazines"); - - // Books / Livres - caps.Categories.AddCategoryMapping(24, NewznabStandardCategory.BooksEBook, "Livres Romans"); - caps.Categories.AddCategoryMapping(124, NewznabStandardCategory.AudioAudiobook, "Livres Audio Books"); - caps.Categories.AddCategoryMapping(96, NewznabStandardCategory.BooksMags, "Livres Magazines"); - caps.Categories.AddCategoryMapping(99, NewznabStandardCategory.BooksOther, "Livres Bandes dessinées"); - caps.Categories.AddCategoryMapping(116, NewznabStandardCategory.BooksEBook, "Livres Romans Jeunesse"); - caps.Categories.AddCategoryMapping(102, NewznabStandardCategory.BooksComics, "Livres Comics"); - caps.Categories.AddCategoryMapping(103, NewznabStandardCategory.BooksOther, "Livres Mangas"); - - // SOFTWARE / Logiciels - caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.PCGames, "Logiciels Jeux PC"); - caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.ConsolePS3, "Logiciels Playstation"); - caps.Categories.AddCategoryMapping(111, NewznabStandardCategory.PCMac, "Logiciels Jeux MAC"); - caps.Categories.AddCategoryMapping(26, NewznabStandardCategory.ConsoleXBox360, "Logiciels XboX"); - caps.Categories.AddCategoryMapping(112, NewznabStandardCategory.PC, "Logiciels Jeux Linux"); - caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.ConsoleWii, "Logiciels Nintendo"); - caps.Categories.AddCategoryMapping(29, NewznabStandardCategory.ConsoleNDS, "Logiciels NDS"); - caps.Categories.AddCategoryMapping(117, NewznabStandardCategory.PC, "Logiciels ROM"); - caps.Categories.AddCategoryMapping(21, NewznabStandardCategory.PC, "Logiciels Applis PC"); - caps.Categories.AddCategoryMapping(22, NewznabStandardCategory.PCMac, "Logiciels Applis Mac"); - caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.PCMobileAndroid, "Logiciels Smartphone"); - - return caps; - } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/ZonaQ.cs b/src/NzbDrone.Core/Indexers/Definitions/ZonaQ.cs index 8247e66b8..69a985353 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/ZonaQ.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/ZonaQ.cs @@ -19,6 +19,7 @@ using NzbDrone.Core.Configuration; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser; using NzbDrone.Core.Parser.Model; @@ -29,20 +30,14 @@ namespace NzbDrone.Core.Indexers.Definitions public class ZonaQ : TorrentIndexerBase { public override string Name => "ZonaQ"; - public override string[] IndexerUrls => new string[] { "https://www.zonaq.pw/" }; private string Login1Url => Settings.BaseUrl + "index.php"; private string Login2Url => Settings.BaseUrl + "paDentro.php"; private string Login3Url => Settings.BaseUrl + "retorno/include/puerta_8_ajax.php"; private string Login4Url => Settings.BaseUrl + "retorno/index.php"; - public override string Description => "ZonaQ is a SPANISH Private Torrent Tracker for MOVIES / TV"; - public override string Language => "es-ES"; - public override Encoding Encoding => Encoding.UTF8; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; - public override IndexerPrivacy Privacy => IndexerPrivacy.Private; - public override IndexerCapabilities Capabilities => SetCapabilities(); - public ZonaQ(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + public ZonaQ(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } @@ -154,83 +149,6 @@ namespace NzbDrone.Core.Indexers.Definitions return false; } - - private IndexerCapabilities SetCapabilities() - { - var caps = new IndexerCapabilities - { - TvSearchParams = new List - { - TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep - }, - MovieSearchParams = new List - { - MovieSearchParam.Q - } - }; - - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=1", NewznabStandardCategory.MoviesDVD, "Películas/DVD"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=2", NewznabStandardCategory.MoviesDVD, "Películas/BDVD + Autorías"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=3", NewznabStandardCategory.MoviesBluRay, "Películas/BD"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=4", NewznabStandardCategory.MoviesUHD, "Películas/BD 4K"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=5", NewznabStandardCategory.Movies3D, "Películas/BD 3D"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=6", NewznabStandardCategory.MoviesBluRay, "Películas/BD Remux"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=7", NewznabStandardCategory.MoviesHD, "Películas/MKV"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=8", NewznabStandardCategory.MoviesUHD, "Películas/MKV 4K"); - caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=9", NewznabStandardCategory.MoviesUHD, "Películas/BD Remux 4K"); - - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=1", NewznabStandardCategory.MoviesDVD, "Animación/DVD"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=2", NewznabStandardCategory.MoviesDVD, "Animación/BDVD + Autorías"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=3", NewznabStandardCategory.MoviesBluRay, "Animación/BD"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=4", NewznabStandardCategory.MoviesUHD, "Animación/BD 4K"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=5", NewznabStandardCategory.Movies3D, "Animación/BD 3D"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=6", NewznabStandardCategory.MoviesBluRay, "Animación/BD Remux"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=7", NewznabStandardCategory.MoviesHD, "Animación/MKV"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=8", NewznabStandardCategory.MoviesUHD, "Animación/MKV 4K"); - caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=9", NewznabStandardCategory.MoviesUHD, "Animación/BD Remux 4K"); - - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=1", NewznabStandardCategory.AudioVideo, "Música/DVD"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=2", NewznabStandardCategory.AudioVideo, "Música/BDVD + Autorías"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=3", NewznabStandardCategory.AudioVideo, "Música/BD"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=4", NewznabStandardCategory.AudioVideo, "Música/BD 4K"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=5", NewznabStandardCategory.AudioVideo, "Música/BD 3D"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=6", NewznabStandardCategory.AudioVideo, "Música/BD Remux"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=7", NewznabStandardCategory.AudioVideo, "Música/MKV"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=8", NewznabStandardCategory.AudioVideo, "Música/MKV 4K"); - caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=9", NewznabStandardCategory.AudioVideo, "Música/BD Remux 4K"); - - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=1", NewznabStandardCategory.TVSD, "Series/DVD"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=2", NewznabStandardCategory.TVSD, "Series/BDVD + Autorías"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=3", NewznabStandardCategory.TVHD, "Series/BD"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=4", NewznabStandardCategory.TVUHD, "Series/BD 4K"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=5", NewznabStandardCategory.TVOther, "Series/BD 3D"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=6", NewznabStandardCategory.TVHD, "Series/BD Remux"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=7", NewznabStandardCategory.TVHD, "Series/MKV"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=8", NewznabStandardCategory.TVUHD, "Series/MKV 4K"); - caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=9", NewznabStandardCategory.TVUHD, "Series/BD Remux 4K"); - - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=1", NewznabStandardCategory.TVDocumentary, "Docus/DVD"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=2", NewznabStandardCategory.TVDocumentary, "Docus/BDVD + Autorías"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=3", NewznabStandardCategory.TVDocumentary, "Docus/BD"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=4", NewznabStandardCategory.TVDocumentary, "Docus/BD 4K"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=5", NewznabStandardCategory.TVDocumentary, "Docus/BD 3D"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=6", NewznabStandardCategory.TVDocumentary, "Docus/BD Remux"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=7", NewznabStandardCategory.TVDocumentary, "Docus/MKV"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=8", NewznabStandardCategory.TVDocumentary, "Docus/MKV 4K"); - caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=9", NewznabStandardCategory.TVDocumentary, "Docus/BD Remux 4K"); - - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=1", NewznabStandardCategory.OtherMisc, "Deportes y Otros/DVD"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=2", NewznabStandardCategory.OtherMisc, "Deportes y Otros/BDVD + Autorías"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=3", NewznabStandardCategory.OtherMisc, "Deportes y Otros/BD"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=4", NewznabStandardCategory.OtherMisc, "Deportes y Otros/BD 4K"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=5", NewznabStandardCategory.OtherMisc, "Deportes y Otros/BD 3D"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=6", NewznabStandardCategory.OtherMisc, "Deportes y Otros/BD Remux"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=7", NewznabStandardCategory.OtherMisc, "Deportes y Otros/MKV"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=8", NewznabStandardCategory.OtherMisc, "Deportes y Otros/MKV 4K"); - caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=9", NewznabStandardCategory.OtherMisc, "Deportes y Otros/BD Remux 4K"); - - return caps; - } } public class ZonaQRequestGenerator : IIndexerRequestGenerator diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index 9adc525e2..5be268d8e 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -13,6 +13,7 @@ using NzbDrone.Core.Http.CloudFlare; using NzbDrone.Core.Indexers.Events; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser.Model; @@ -34,6 +35,9 @@ namespace NzbDrone.Core.Indexers public override Encoding Encoding => Encoding.UTF8; public override string Language => "en-US"; public override string[] LegacyUrls => new string[] { }; + public override string Description => ""; + public override string[] IndexerUrls => new string[] { }; + public override IndexerPrivacy Privacy => IndexerPrivacy.Public; public override bool FollowRedirect => false; public override IndexerCapabilities Capabilities { get; protected set; } @@ -43,8 +47,8 @@ namespace NzbDrone.Core.Indexers public abstract IIndexerRequestGenerator GetRequestGenerator(); public abstract IParseIndexerResponse GetParser(); - public HttpIndexerBase(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(indexerStatusService, configService, logger) + public HttpIndexerBase(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) + : base(indexerStatusService, definitionService, configService, logger) { _httpClient = httpClient; _eventAggregator = eventAggregator; diff --git a/src/NzbDrone.Core/Indexers/IndexerBase.cs b/src/NzbDrone.Core/Indexers/IndexerBase.cs index 923a0598a..f931a05dc 100644 --- a/src/NzbDrone.Core/Indexers/IndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/IndexerBase.cs @@ -8,6 +8,7 @@ using NLog; using NzbDrone.Common.Extensions; using NzbDrone.Core.Configuration; using NzbDrone.Core.IndexerSearch.Definitions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Parser.Model; using NzbDrone.Core.ThingiProvider; @@ -17,6 +18,7 @@ namespace NzbDrone.Core.Indexers where TSettings : IIndexerSettings, new() { protected readonly IIndexerStatusService _indexerStatusService; + protected readonly IIndexerDefinitionUpdateService _definitionService; protected readonly IConfigService _configService; protected readonly Logger _logger; @@ -37,9 +39,10 @@ namespace NzbDrone.Core.Indexers public abstract bool SupportsRedirect { get; } public abstract IndexerCapabilities Capabilities { get; protected set; } - public IndexerBase(IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) + public IndexerBase(IIndexerStatusService indexerStatusService, IIndexerDefinitionUpdateService definitionService, IConfigService configService, Logger logger) { _indexerStatusService = indexerStatusService; + _definitionService = definitionService; _configService = configService; _logger = logger; } @@ -64,18 +67,38 @@ namespace NzbDrone.Core.Indexers { get { - var config = (IProviderConfig)new TSettings(); - - yield return new IndexerDefinition + foreach (var def in _definitionService.AllForImplementation(GetType().Name.ToLower())) { - Name = GetType().Name, - Enable = config.Validate().IsValid && SupportsRss, - Implementation = GetType().Name, - Settings = config - }; + yield return GetDefinition(def); + } } } + private IndexerDefinition GetDefinition(IndexerMetaDefinition definition) + { + var config = (IProviderConfig)new TSettings(); + + return new IndexerDefinition + { + Enable = config.Validate().IsValid && SupportsRss, + Name = definition.Name, + Language = definition.Language, + Implementation = GetType().Name, + DefinitionFile = definition.File, + Settings = config, + Privacy = definition.Type switch + { + "private" => IndexerPrivacy.Private, + "public" => IndexerPrivacy.Public, + _ => IndexerPrivacy.SemiPrivate + }, + SupportsRss = SupportsRss, + SupportsSearch = SupportsSearch, + SupportsRedirect = SupportsRedirect, + Capabilities = new IndexerCapabilities() + }; + } + public virtual ProviderDefinition Definition { get; set; } public virtual object RequestAction(string action, IDictionary query) diff --git a/src/NzbDrone.Core/Indexers/IndexerDefinition.cs b/src/NzbDrone.Core/Indexers/IndexerDefinition.cs index 4979bf32b..85da031f0 100644 --- a/src/NzbDrone.Core/Indexers/IndexerDefinition.cs +++ b/src/NzbDrone.Core/Indexers/IndexerDefinition.cs @@ -13,6 +13,7 @@ namespace NzbDrone.Core.Indexers public string[] IndexerUrls { get; set; } public string[] LegacyUrls { get; set; } public string Description { get; set; } + public string DefinitionFile { get; set; } public Encoding Encoding { get; set; } public string Language { get; set; } public DownloadProtocol Protocol { get; set; } diff --git a/src/NzbDrone.Core/Indexers/IndexerFactory.cs b/src/NzbDrone.Core/Indexers/IndexerFactory.cs index 022b203b4..07b835d1a 100644 --- a/src/NzbDrone.Core/Indexers/IndexerFactory.cs +++ b/src/NzbDrone.Core/Indexers/IndexerFactory.cs @@ -50,18 +50,22 @@ namespace NzbDrone.Core.Indexers foreach (var definition in definitions) { - if (definition.Implementation == typeof(Cardigann.Cardigann).Name) + try { - try + if (definition.Implementation != typeof(Newznab.Newznab).Name) { - MapCardigannDefinition(definition); + MapBaseDefinition(definition); } - catch + + if (definition.Implementation == typeof(Cardigann.Cardigann).Name) { - // Skip indexer if we fail in Cardigann mapping - _logger.Debug("Indexer {0} has no definition", definition.Name); + MapCardigannDefinition(definition); } } + catch + { + _logger.Debug("Indexer {0} has no definition", definition.Name); + } filteredDefinitions.Add(definition); } @@ -73,17 +77,22 @@ namespace NzbDrone.Core.Indexers { var definition = base.Get(id); - if (definition.Implementation == typeof(Cardigann.Cardigann).Name) + try { - try + if (definition.Implementation != typeof(Newznab.Newznab).Name) { - MapCardigannDefinition(definition); + MapBaseDefinition(definition); } - catch + + if (definition.Implementation == typeof(Cardigann.Cardigann).Name) { - throw new ModelNotFoundException(typeof(IndexerDefinition), id); + MapCardigannDefinition(definition); } } + catch + { + throw new ModelNotFoundException(typeof(IndexerDefinition), id); + } return definition; } @@ -93,21 +102,9 @@ namespace NzbDrone.Core.Indexers return base.Active().Where(c => c.Enable).ToList(); } - private void MapCardigannDefinition(IndexerDefinition definition) + private void MapBaseDefinition(IndexerDefinition definition) { - var settings = (CardigannSettings)definition.Settings; - var defFile = _definitionService.GetCachedDefinition(settings.DefinitionFile); - definition.ExtraFields = defFile.Settings; - - if (defFile.Login?.Captcha != null && !definition.ExtraFields.Any(x => x.Type == "cardigannCaptcha")) - { - definition.ExtraFields.Add(new SettingsField - { - Name = "cardigannCaptcha", - Type = "cardigannCaptcha", - Label = "CAPTCHA" - }); - } + var defFile = _definitionService.GetCachedDefinition(definition.DefinitionFile); definition.IndexerUrls = defFile.Links.ToArray(); definition.LegacyUrls = defFile.Legacylinks.ToArray(); @@ -123,10 +120,27 @@ namespace NzbDrone.Core.Indexers definition.Capabilities = new IndexerCapabilities(); definition.Capabilities.ParseCardigannSearchModes(defFile.Caps.Modes); definition.Capabilities.SupportsRawSearch = defFile.Caps.Allowrawsearch; - MapCardigannCategories(definition, defFile); + MapIndexerCategories(definition, defFile); } - private void MapCardigannCategories(IndexerDefinition def, CardigannDefinition defFile) + private void MapCardigannDefinition(IndexerDefinition definition) + { + var settings = (CardigannSettings)definition.Settings; + var defFile = _definitionService.GetCachedDefinition(definition.DefinitionFile); + definition.ExtraFields = defFile.Settings; + + if (defFile.Login?.Captcha != null && !definition.ExtraFields.Any(x => x.Type == "cardigannCaptcha")) + { + definition.ExtraFields.Add(new SettingsField + { + Name = "cardigannCaptcha", + Type = "cardigannCaptcha", + Label = "CAPTCHA" + }); + } + } + + private void MapIndexerCategories(IndexerDefinition def, CardigannDefinition defFile) { if (defFile.Caps.Categories != null) { @@ -177,8 +191,7 @@ namespace NzbDrone.Core.Indexers continue; } - var definitions = provider.DefaultDefinitions - .Where(v => v.Name != null && (v.Name != typeof(Cardigann.Cardigann).Name || v.Name != typeof(Newznab.Newznab).Name || v.Name != typeof(Torznab.Torznab).Name)); + var definitions = provider.DefaultDefinitions; foreach (IndexerDefinition definition in definitions) { @@ -201,18 +214,6 @@ namespace NzbDrone.Core.Indexers definition.SupportsRss = provider.SupportsRss; definition.SupportsSearch = provider.SupportsSearch; definition.SupportsRedirect = provider.SupportsRedirect; - - //We want to use the definition Caps and Privacy for Cardigann instead of the provider. - if (definition.Implementation != typeof(Cardigann.Cardigann).Name) - { - definition.IndexerUrls = provider.IndexerUrls; - definition.LegacyUrls = provider.LegacyUrls; - definition.Privacy = provider.Privacy; - definition.Description = provider.Description; - definition.Encoding = provider.Encoding; - definition.Language = provider.Language; - definition.Capabilities = provider.Capabilities; - } } public List Enabled(bool filterBlockedIndexers = true) @@ -294,6 +295,8 @@ namespace NzbDrone.Core.Indexers settings.Categories = _newznabCapabilitiesProvider.GetCapabilities(settings, definition)?.Categories.GetTorznabCategoryList() ?? null; } + MapBaseDefinition(definition); + if (definition.Implementation == typeof(Cardigann.Cardigann).Name) { MapCardigannDefinition(definition); @@ -314,6 +317,8 @@ namespace NzbDrone.Core.Indexers settings.Categories = _newznabCapabilitiesProvider.GetCapabilities(settings, definition)?.Categories.GetTorznabCategoryList() ?? null; } + MapBaseDefinition(definition); + if (definition.Implementation == typeof(Cardigann.Cardigann).Name) { MapCardigannDefinition(definition); diff --git a/src/NzbDrone.Core/Indexers/TorrentIndexerBase.cs b/src/NzbDrone.Core/Indexers/TorrentIndexerBase.cs index b804c2903..757a60ace 100644 --- a/src/NzbDrone.Core/Indexers/TorrentIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/TorrentIndexerBase.cs @@ -7,6 +7,7 @@ using NLog; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Exceptions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers @@ -14,8 +15,13 @@ namespace NzbDrone.Core.Indexers public abstract class TorrentIndexerBase : HttpIndexerBase where TSettings : IIndexerSettings, new() { - protected TorrentIndexerBase(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + protected TorrentIndexerBase(IIndexerHttpClient httpClient, + IEventAggregator eventAggregator, + IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, + IConfigService configService, + Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { } diff --git a/src/NzbDrone.Core/Indexers/UsenetIndexerBase.cs b/src/NzbDrone.Core/Indexers/UsenetIndexerBase.cs index f8104a844..32f45a12c 100644 --- a/src/NzbDrone.Core/Indexers/UsenetIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/UsenetIndexerBase.cs @@ -6,6 +6,7 @@ using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Download; using NzbDrone.Core.Exceptions; +using NzbDrone.Core.IndexerVersions; using NzbDrone.Core.Messaging.Events; namespace NzbDrone.Core.Indexers @@ -15,8 +16,14 @@ namespace NzbDrone.Core.Indexers { private readonly IValidateNzbs _nzbValidationService; - protected UsenetIndexerBase(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, IValidateNzbs nzbValidationService, Logger logger) - : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + protected UsenetIndexerBase(IIndexerHttpClient httpClient, + IEventAggregator eventAggregator, + IIndexerStatusService indexerStatusService, + IIndexerDefinitionUpdateService definitionService, + IConfigService configService, + IValidateNzbs nzbValidationService, + Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, definitionService, configService, logger) { _nzbValidationService = nzbValidationService; } diff --git a/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs b/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs index eb1e88c97..450ca57ea 100644 --- a/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs +++ b/src/Prowlarr.Api.V1/Indexers/IndexerResource.cs @@ -16,7 +16,7 @@ namespace Prowlarr.Api.V1.Indexers { public string[] IndexerUrls { get; set; } public string[] LegacyUrls { get; set; } - public string DefinitionName { get; set; } + public string DefinitionFile { get; set; } public string Description { get; set; } public string Language { get; set; } public string Encoding { get; set; } @@ -53,8 +53,6 @@ namespace Prowlarr.Api.V1.Indexers var resource = base.ToResource(definition); - resource.DefinitionName = definition.ImplementationName; - var infoLinkName = definition.ImplementationName; if (definition.Implementation == typeof(Cardigann).Name) @@ -75,10 +73,10 @@ namespace Prowlarr.Api.V1.Indexers } } - resource.DefinitionName = settings.DefinitionFile; - infoLinkName = settings.DefinitionFile; + infoLinkName = definition.DefinitionFile; } + resource.DefinitionFile = definition.DefinitionFile ?? definition.ImplementationName; resource.InfoLink = string.Format("https://wiki.servarr.com/prowlarr/supported-indexers#{0}", infoLinkName.ToLower().Replace(' ', '-')); resource.AppProfileId = definition.AppProfileId; resource.IndexerUrls = definition.IndexerUrls; @@ -109,6 +107,7 @@ namespace Prowlarr.Api.V1.Indexers } var definition = base.ToModel(resource); + definition.DefinitionFile = resource.DefinitionFile; if (resource.Implementation == typeof(Cardigann).Name) { @@ -116,7 +115,7 @@ namespace Prowlarr.Api.V1.Indexers var settings = (CardigannSettings)definition.Settings; - var cardigannDefinition = _definitionService.GetCachedDefinition(settings.DefinitionFile); + var cardigannDefinition = _definitionService.GetCachedDefinition(definition.DefinitionFile); foreach (var field in resource.Fields) {