From 9cdad3de64b84896c78e1d5bbf81eda08fc9bc61 Mon Sep 17 00:00:00 2001 From: Diego Heras Date: Sun, 18 Oct 2020 19:26:22 +0200 Subject: [PATCH] core: separate categories from movie-search (#9862) * Categories and Torznab movie-search are separated * Movie-search parameters are validated * Fixed some bugs in Cardigann indexers --- .../Definitions/funkytorrents.yml | 1 + .../Definitions/gay-torrents.yml | 1 + .../Definitions/gay-torrentsorg.yml | 1 + .../Definitions/gaytorrentru.yml | 1 + .../Definitions/marinetracker.yml | 1 + .../Definitions/mma-torrents.yml | 1 + .../Definitions/torrentview.yml | 1 + src/Jackett.Common/Indexers/Abnormal.cs | 4 +- src/Jackett.Common/Indexers/AlphaRatio.cs | 2 +- src/Jackett.Common/Indexers/AnimeBytes.cs | 12 +- src/Jackett.Common/Indexers/AnimeTorrents.cs | 4 +- src/Jackett.Common/Indexers/Anthelion.cs | 4 +- src/Jackett.Common/Indexers/AvistaZ.cs | 3 +- src/Jackett.Common/Indexers/AwesomeHD.cs | 2 +- src/Jackett.Common/Indexers/BB.cs | 4 +- src/Jackett.Common/Indexers/BJShare.cs | 2 +- src/Jackett.Common/Indexers/BakaBT.cs | 3 +- src/Jackett.Common/Indexers/BaseIndexer.cs | 12 +- .../Indexers/BitCityReloaded.cs | 4 +- src/Jackett.Common/Indexers/BitHDTV.cs | 2 +- .../Indexers/CardigannIndexer.cs | 8 +- src/Jackett.Common/Indexers/Cinecalidad.cs | 4 +- src/Jackett.Common/Indexers/CinemaZ.cs | 3 +- src/Jackett.Common/Indexers/CorsaroRed.cs | 4 +- src/Jackett.Common/Indexers/DanishBits.cs | 2 +- .../Indexers/DarmoweTorrenty.cs | 4 +- src/Jackett.Common/Indexers/DigitalCore.cs | 2 +- src/Jackett.Common/Indexers/DivxTotal.cs | 4 +- src/Jackett.Common/Indexers/EliteTracker.cs | 2 +- src/Jackett.Common/Indexers/EpubLibre.cs | 4 +- src/Jackett.Common/Indexers/FileList.cs | 2 +- src/Jackett.Common/Indexers/FunFile.cs | 2 +- src/Jackett.Common/Indexers/Fuzer.cs | 2 +- src/Jackett.Common/Indexers/GazelleGames.cs | 2 +- src/Jackett.Common/Indexers/GimmePeers.cs | 4 +- src/Jackett.Common/Indexers/HDBitsApi.cs | 2 +- src/Jackett.Common/Indexers/HDSpace.cs | 2 +- src/Jackett.Common/Indexers/HDTorrents.cs | 2 +- src/Jackett.Common/Indexers/Hebits.cs | 4 +- src/Jackett.Common/Indexers/IPTorrents.cs | 2 +- src/Jackett.Common/Indexers/IceTorrent.cs | 3 +- src/Jackett.Common/Indexers/ImmortalSeed.cs | 4 +- .../Indexers/InternetArchive.cs | 4 +- src/Jackett.Common/Indexers/LostFilm.cs | 4 +- src/Jackett.Common/Indexers/MejorTorrent.cs | 4 +- src/Jackett.Common/Indexers/Milkie.cs | 4 +- src/Jackett.Common/Indexers/MoreThanTV.cs | 14 ++- src/Jackett.Common/Indexers/MyAmity.cs | 4 +- src/Jackett.Common/Indexers/NCore.cs | 3 +- src/Jackett.Common/Indexers/NewPCT.cs | 12 +- src/Jackett.Common/Indexers/NewRealWorld.cs | 4 +- src/Jackett.Common/Indexers/NorBits.cs | 2 +- src/Jackett.Common/Indexers/NotWhatCD.cs | 1 + src/Jackett.Common/Indexers/Orpheus.cs | 1 + src/Jackett.Common/Indexers/Partis.cs | 4 +- src/Jackett.Common/Indexers/PassThePopcorn.cs | 2 +- src/Jackett.Common/Indexers/PirateTheNet.cs | 2 +- src/Jackett.Common/Indexers/PixelHD.cs | 2 +- src/Jackett.Common/Indexers/PolishTracker.cs | 2 +- src/Jackett.Common/Indexers/PreToMe.cs | 2 +- src/Jackett.Common/Indexers/PrivateHD.cs | 3 +- src/Jackett.Common/Indexers/PsyTorrents.cs | 5 +- src/Jackett.Common/Indexers/RarBG.cs | 2 +- src/Jackett.Common/Indexers/Redacted.cs | 1 + src/Jackett.Common/Indexers/RevolutionTT.cs | 2 +- src/Jackett.Common/Indexers/RuTracker.cs | 4 +- src/Jackett.Common/Indexers/SceneFZ.cs | 3 +- src/Jackett.Common/Indexers/SceneHD.cs | 2 +- src/Jackett.Common/Indexers/SceneTime.cs | 4 +- src/Jackett.Common/Indexers/SecretCinema.cs | 2 +- src/Jackett.Common/Indexers/Shazbat.cs | 11 +- src/Jackett.Common/Indexers/SolidTorrents.cs | 4 +- src/Jackett.Common/Indexers/SpeedCD.cs | 2 +- src/Jackett.Common/Indexers/SuperBits.cs | 2 +- src/Jackett.Common/Indexers/TVStore.cs | 2 +- src/Jackett.Common/Indexers/TVVault.cs | 2 +- src/Jackett.Common/Indexers/ThePirateBay.cs | 4 +- src/Jackett.Common/Indexers/Toloka.cs | 4 +- src/Jackett.Common/Indexers/TorrentBytes.cs | 2 +- src/Jackett.Common/Indexers/TorrentDay.cs | 4 +- src/Jackett.Common/Indexers/TorrentHeaven.cs | 4 +- src/Jackett.Common/Indexers/TorrentLeech.cs | 2 +- src/Jackett.Common/Indexers/TorrentMafya.cs | 4 +- src/Jackett.Common/Indexers/TorrentNetwork.cs | 4 +- src/Jackett.Common/Indexers/TorrentSeeds.cs | 4 +- .../Indexers/TorrentSyndikat.cs | 8 +- src/Jackett.Common/Indexers/XSpeeds.cs | 2 +- src/Jackett.Common/Indexers/Xthor.cs | 4 +- src/Jackett.Common/Indexers/XtremeZone.cs | 3 +- src/Jackett.Common/Indexers/YTS.cs | 2 +- .../Models/TorznabCapabilities.cs | 100 ++++++++-------- .../Controllers/ResultsController.cs | 4 +- .../Common/Models/TorznabCapabilitiesTests.cs | 108 +++++++++++------- src/Jackett.Test/Torznab/TorznabTests.cs | 49 ++++---- 94 files changed, 332 insertions(+), 235 deletions(-) diff --git a/src/Jackett.Common/Definitions/funkytorrents.yml b/src/Jackett.Common/Definitions/funkytorrents.yml index 30ecab86b..3780eb7ea 100644 --- a/src/Jackett.Common/Definitions/funkytorrents.yml +++ b/src/Jackett.Common/Definitions/funkytorrents.yml @@ -53,6 +53,7 @@ caps: modes: search: [q] + movie-search: [q] music-search: [q, album, artist, label, year] book-search: [q] diff --git a/src/Jackett.Common/Definitions/gay-torrents.yml b/src/Jackett.Common/Definitions/gay-torrents.yml index dcf76ebe3..4397cb1ac 100644 --- a/src/Jackett.Common/Definitions/gay-torrents.yml +++ b/src/Jackett.Common/Definitions/gay-torrents.yml @@ -59,6 +59,7 @@ caps: modes: search: [q] + movie-search: [q] book-search: [q] login: diff --git a/src/Jackett.Common/Definitions/gay-torrentsorg.yml b/src/Jackett.Common/Definitions/gay-torrentsorg.yml index 424c7d8b7..9afcf04b7 100644 --- a/src/Jackett.Common/Definitions/gay-torrentsorg.yml +++ b/src/Jackett.Common/Definitions/gay-torrentsorg.yml @@ -73,6 +73,7 @@ caps: modes: search: [q] + movie-search: [q] book-search: [q] login: diff --git a/src/Jackett.Common/Definitions/gaytorrentru.yml b/src/Jackett.Common/Definitions/gaytorrentru.yml index 18846dd12..90242fceb 100644 --- a/src/Jackett.Common/Definitions/gaytorrentru.yml +++ b/src/Jackett.Common/Definitions/gaytorrentru.yml @@ -77,6 +77,7 @@ caps: - {id: 64, cat: XXX, desc: "Scat"} modes: search: [q] + movie-search: [q] book-search: [q] login: diff --git a/src/Jackett.Common/Definitions/marinetracker.yml b/src/Jackett.Common/Definitions/marinetracker.yml index 024daa88f..e1caf1dd2 100644 --- a/src/Jackett.Common/Definitions/marinetracker.yml +++ b/src/Jackett.Common/Definitions/marinetracker.yml @@ -94,6 +94,7 @@ caps: modes: search: [q] + movie-search: [q] book-search: [q] settings: diff --git a/src/Jackett.Common/Definitions/mma-torrents.yml b/src/Jackett.Common/Definitions/mma-torrents.yml index 8b057e0b8..9246b7f87 100644 --- a/src/Jackett.Common/Definitions/mma-torrents.yml +++ b/src/Jackett.Common/Definitions/mma-torrents.yml @@ -64,6 +64,7 @@ caps: modes: search: [q] tv-search: [q, season, ep] + movie-search: [q] book-search: [q] settings: diff --git a/src/Jackett.Common/Definitions/torrentview.yml b/src/Jackett.Common/Definitions/torrentview.yml index 0f97ef20e..5b8ad10d1 100644 --- a/src/Jackett.Common/Definitions/torrentview.yml +++ b/src/Jackett.Common/Definitions/torrentview.yml @@ -43,6 +43,7 @@ caps: modes: search: [q] + movie-search: [q] settings: [] diff --git a/src/Jackett.Common/Indexers/Abnormal.cs b/src/Jackett.Common/Indexers/Abnormal.cs index 932c7715d..1f4bbe556 100644 --- a/src/Jackett.Common/Indexers/Abnormal.cs +++ b/src/Jackett.Common/Indexers/Abnormal.cs @@ -56,7 +56,9 @@ namespace Jackett.Common.Indexers name: "Abnormal", description: "General French Private Tracker", link: "https://abnormal.ws/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: w, logger: l, diff --git a/src/Jackett.Common/Indexers/AlphaRatio.cs b/src/Jackett.Common/Indexers/AlphaRatio.cs index 0e818e6e0..780ed10cd 100644 --- a/src/Jackett.Common/Indexers/AlphaRatio.cs +++ b/src/Jackett.Common/Indexers/AlphaRatio.cs @@ -19,7 +19,7 @@ namespace Jackett.Common.Indexers link: "https://alpharatio.cc/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: wc, diff --git a/src/Jackett.Common/Indexers/AnimeBytes.cs b/src/Jackett.Common/Indexers/AnimeBytes.cs index 4bc5c6548..09dbd8f38 100644 --- a/src/Jackett.Common/Indexers/AnimeBytes.cs +++ b/src/Jackett.Common/Indexers/AnimeBytes.cs @@ -43,15 +43,9 @@ namespace Jackett.Common.Indexers link: "https://animebytes.tv/", configService: configService, client: client, - caps: new TorznabCapabilities(TorznabCatType.TVAnime, - TorznabCatType.Movies, - TorznabCatType.BooksComics, - TorznabCatType.ConsolePSP, - TorznabCatType.ConsoleOther, - TorznabCatType.PCGames, - TorznabCatType.AudioMP3, - TorznabCatType.AudioLossless, - TorznabCatType.AudioOther), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, logger: l, p: ps, configData: new ConfigurationDataAnimeBytes("Note: Go to AnimeBytes site and open your account settings. Go to 'Account' tab, move cursor over black part near 'Passkey' and copy its value. Your username is case sensitive.")) diff --git a/src/Jackett.Common/Indexers/AnimeTorrents.cs b/src/Jackett.Common/Indexers/AnimeTorrents.cs index 50b2b8ae3..bdb344489 100644 --- a/src/Jackett.Common/Indexers/AnimeTorrents.cs +++ b/src/Jackett.Common/Indexers/AnimeTorrents.cs @@ -37,7 +37,9 @@ namespace Jackett.Common.Indexers name: "AnimeTorrents", description: "Definitive source for anime and manga", link: "https://animetorrents.me/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: c, logger: l, diff --git a/src/Jackett.Common/Indexers/Anthelion.cs b/src/Jackett.Common/Indexers/Anthelion.cs index e5497c77c..2d1c28d1a 100644 --- a/src/Jackett.Common/Indexers/Anthelion.cs +++ b/src/Jackett.Common/Indexers/Anthelion.cs @@ -35,7 +35,9 @@ namespace Jackett.Common.Indexers name: "Anthelion", // old name: TehConnection.me description: "A movies tracker", link: "https://anthelion.me/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/AvistaZ.cs b/src/Jackett.Common/Indexers/AvistaZ.cs index bb31476ef..d2d97df82 100644 --- a/src/Jackett.Common/Indexers/AvistaZ.cs +++ b/src/Jackett.Common/Indexers/AvistaZ.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Jackett.Common.Indexers.Abstract; using Jackett.Common.Models; @@ -17,7 +18,7 @@ namespace Jackett.Common.Indexers link: "https://avistaz.to/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/AwesomeHD.cs b/src/Jackett.Common/Indexers/AwesomeHD.cs index dbc7c46e5..1e4663e50 100644 --- a/src/Jackett.Common/Indexers/AwesomeHD.cs +++ b/src/Jackett.Common/Indexers/AwesomeHD.cs @@ -31,7 +31,7 @@ namespace Jackett.Common.Indexers link: "https://awesome-hd.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/BB.cs b/src/Jackett.Common/Indexers/BB.cs index 4ef104736..7ba67de51 100644 --- a/src/Jackett.Common/Indexers/BB.cs +++ b/src/Jackett.Common/Indexers/BB.cs @@ -38,7 +38,9 @@ namespace Jackett.Common.Indexers name: "bB", description: "bB is a Private Torrent Tracker for 0DAY / GENERAL", link: StringUtil.FromBase64("aHR0cHM6Ly9iYWNvbmJpdHMub3JnLw=="), - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: w, logger: l, diff --git a/src/Jackett.Common/Indexers/BJShare.cs b/src/Jackett.Common/Indexers/BJShare.cs index 432790438..3e60f4bcc 100644 --- a/src/Jackett.Common/Indexers/BJShare.cs +++ b/src/Jackett.Common/Indexers/BJShare.cs @@ -67,7 +67,7 @@ namespace Jackett.Common.Indexers link: "https://bj-share.info/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: wc, diff --git a/src/Jackett.Common/Indexers/BakaBT.cs b/src/Jackett.Common/Indexers/BakaBT.cs index 417ac153e..7c00758ca 100644 --- a/src/Jackett.Common/Indexers/BakaBT.cs +++ b/src/Jackett.Common/Indexers/BakaBT.cs @@ -41,7 +41,7 @@ namespace Jackett.Common.Indexers name: "BakaBT", description: "Anime Comunity", link: "https://bakabt.me/", - caps: new TorznabCapabilities(TorznabCatType.TVAnime), + caps: new TorznabCapabilities(), configService: configService, client: wc, logger: l, @@ -52,6 +52,7 @@ namespace Jackett.Common.Indexers Encoding = Encoding.UTF8; Language = "en-us"; Type = "private"; + AddCategoryMapping(1, TorznabCatType.TVAnime, "Anime Series"); AddCategoryMapping(2, TorznabCatType.TVAnime, "OVA"); AddCategoryMapping(3, TorznabCatType.AudioOther, "Soundtrack"); diff --git a/src/Jackett.Common/Indexers/BaseIndexer.cs b/src/Jackett.Common/Indexers/BaseIndexer.cs index 90030372c..76c4e04ff 100644 --- a/src/Jackett.Common/Indexers/BaseIndexer.cs +++ b/src/Jackett.Common/Indexers/BaseIndexer.cs @@ -287,9 +287,9 @@ namespace Jackett.Common.Indexers return false; if (caps.SupportsImdbTVSearch && query.IsImdbQuery && query.IsTVSearch) return true; - if (caps.SupportsImdbMovieSearch && query.IsImdbQuery && query.IsMovieSearch) + if (caps.MovieSearchImdbAvailable && query.IsImdbQuery && query.IsMovieSearch) return true; - else if (!caps.SupportsImdbMovieSearch && query.IsImdbQuery && query.QueryType != "TorrentPotato") // potato query should always contain imdb+search term + else if (!caps.MovieSearchImdbAvailable && query.IsImdbQuery && query.QueryType != "TorrentPotato") // potato query should always contain imdb+search term return false; if (caps.SearchAvailable && query.IsSearch) return true; @@ -305,9 +305,9 @@ namespace Jackett.Common.Indexers return true; if (caps.SupportsTvdbSearch && query.IsTvdbSearch) return true; - if (caps.SupportsImdbMovieSearch && query.IsImdbQuery) + if (caps.MovieSearchImdbAvailable && query.IsImdbQuery) return true; - if (caps.SupportsTmdbMovieSearch && query.IsTmdbQuery) + if (caps.MovieSearchTmdbAvailable && query.IsTmdbQuery) return true; return false; @@ -583,11 +583,7 @@ namespace Jackett.Common.Indexers { categoryMapping.Add(new CategoryMapping(trackerCategory, trackerCategoryDesc, newznabCategory.ID)); if (!TorznabCaps.Categories.Contains(newznabCategory)) - { TorznabCaps.Categories.Add(newznabCategory); - if (TorznabCatType.Movies.Contains(newznabCategory)) - TorznabCaps.MovieSearchAvailable = true; - } // add 1:1 categories if (trackerCategoryDesc != null && trackerCategory != null) diff --git a/src/Jackett.Common/Indexers/BitCityReloaded.cs b/src/Jackett.Common/Indexers/BitCityReloaded.cs index 145fa0712..20524fabe 100644 --- a/src/Jackett.Common/Indexers/BitCityReloaded.cs +++ b/src/Jackett.Common/Indexers/BitCityReloaded.cs @@ -35,7 +35,9 @@ namespace Jackett.Common.Indexers name: "Bit-City Reloaded", description: "A German general tracker.", link: "https://bc-reloaded.net/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/BitHDTV.cs b/src/Jackett.Common/Indexers/BitHDTV.cs index dcd6f1e9f..b7e19fd7e 100644 --- a/src/Jackett.Common/Indexers/BitHDTV.cs +++ b/src/Jackett.Common/Indexers/BitHDTV.cs @@ -34,7 +34,7 @@ namespace Jackett.Common.Indexers link: "https://www.bit-hdtv.com/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/CardigannIndexer.cs b/src/Jackett.Common/Indexers/CardigannIndexer.cs index 807f79b02..74abf56fe 100644 --- a/src/Jackett.Common/Indexers/CardigannIndexer.cs +++ b/src/Jackett.Common/Indexers/CardigannIndexer.cs @@ -116,10 +116,10 @@ namespace Jackett.Common.Indexers // SupportsImdbTVSearch temporarily disabled due to #8107 // SupportsImdbTVSearch = Definition.Caps.Modes.Any(c => c.Key == "tv-search" && c.Value.Contains("imdbid")), SupportsTvdbSearch = Definition.Caps.Modes.Any(c => c.Key == "tv-search" && c.Value.Contains("tvdbid")), - SupportsImdbMovieSearch = Definition.Caps.Modes.Any(c => c.Key == "movie-search" && c.Value.Contains("imdbid")), - SupportsTmdbMovieSearch = Definition.Caps.Modes.Any(c => c.Key == "movie-search" && c.Value.Contains("tmdbid")), BookSearchAvailable = Definition.Caps.Modes.Any(c => c.Key == "book-search" && c.Value.Contains("author") && c.Value.Contains("title")) }; + if (Definition.Caps.Modes.ContainsKey("movie-search")) + TorznabCaps.ParseMovieSearchParams(Definition.Caps.Modes["movie-search"]); if (Definition.Caps.Modes.ContainsKey("music-search")) TorznabCaps.SupportedMusicSearchParamsList = Definition.Caps.Modes["music-search"]; @@ -1624,10 +1624,10 @@ namespace Jackett.Common.Indexers if (Filter.Args != null) CharacterLimit = int.Parse(Filter.Args); - if (query.ImdbID != null && TorznabCaps.SupportsImdbMovieSearch) + if (query.ImdbID != null && TorznabCaps.MovieSearchImdbAvailable) break; // skip andmatch filter for imdb searches - if (query.TmdbID != null && TorznabCaps.SupportsTmdbMovieSearch) + if (query.TmdbID != null && TorznabCaps.MovieSearchTmdbAvailable) break; // skip andmatch filter for tmdb searches if (query.TvdbID != null && TorznabCaps.SupportsTvdbSearch) diff --git a/src/Jackett.Common/Indexers/Cinecalidad.cs b/src/Jackett.Common/Indexers/Cinecalidad.cs index 89696e8cd..780e707b0 100644 --- a/src/Jackett.Common/Indexers/Cinecalidad.cs +++ b/src/Jackett.Common/Indexers/Cinecalidad.cs @@ -36,7 +36,9 @@ namespace Jackett.Common.Indexers name: "Cinecalidad", description: "Películas Full HD en Castellano y Latino Dual.", link: "https://www.cinecalidad.is/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/CinemaZ.cs b/src/Jackett.Common/Indexers/CinemaZ.cs index dce7701df..15ff7e673 100644 --- a/src/Jackett.Common/Indexers/CinemaZ.cs +++ b/src/Jackett.Common/Indexers/CinemaZ.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Jackett.Common.Indexers.Abstract; using Jackett.Common.Models; @@ -17,7 +18,7 @@ namespace Jackett.Common.Indexers link: "https://cinemaz.to/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/CorsaroRed.cs b/src/Jackett.Common/Indexers/CorsaroRed.cs index 8569a5380..6cc73f9f3 100644 --- a/src/Jackett.Common/Indexers/CorsaroRed.cs +++ b/src/Jackett.Common/Indexers/CorsaroRed.cs @@ -50,7 +50,9 @@ namespace Jackett.Common.Indexers name: "Corsaro.red", description: "Italian Torrents", link: "https://corsaro.red/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/DanishBits.cs b/src/Jackett.Common/Indexers/DanishBits.cs index 70271e6a6..49644a8d6 100644 --- a/src/Jackett.Common/Indexers/DanishBits.cs +++ b/src/Jackett.Common/Indexers/DanishBits.cs @@ -32,7 +32,7 @@ namespace Jackett.Common.Indexers link: "https://danishbits.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: wc, diff --git a/src/Jackett.Common/Indexers/DarmoweTorrenty.cs b/src/Jackett.Common/Indexers/DarmoweTorrenty.cs index 4151e7217..dcbe4507c 100644 --- a/src/Jackett.Common/Indexers/DarmoweTorrenty.cs +++ b/src/Jackett.Common/Indexers/DarmoweTorrenty.cs @@ -40,7 +40,9 @@ namespace Jackett.Common.Indexers name: "Darmowe torenty", description: "Darmowe torenty is a POLISH Semi-Private Torrent Tracker for MOVIES / TV / GENERAL", link: "https://darmowe-torenty.pl/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/DigitalCore.cs b/src/Jackett.Common/Indexers/DigitalCore.cs index cc0e559f8..3709dbcde 100644 --- a/src/Jackett.Common/Indexers/DigitalCore.cs +++ b/src/Jackett.Common/Indexers/DigitalCore.cs @@ -36,7 +36,7 @@ namespace Jackett.Common.Indexers link: "https://digitalcore.club/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: w, diff --git a/src/Jackett.Common/Indexers/DivxTotal.cs b/src/Jackett.Common/Indexers/DivxTotal.cs index 95272993a..dea255b89 100644 --- a/src/Jackett.Common/Indexers/DivxTotal.cs +++ b/src/Jackett.Common/Indexers/DivxTotal.cs @@ -50,7 +50,9 @@ namespace Jackett.Common.Indexers name: "DivxTotal", description: "DivxTotal is a SPANISH site for Movies, TV series and Software", link: "https://www.divxtotal.la/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: w, logger: l, diff --git a/src/Jackett.Common/Indexers/EliteTracker.cs b/src/Jackett.Common/Indexers/EliteTracker.cs index 6e23b82d2..3e19360fa 100644 --- a/src/Jackett.Common/Indexers/EliteTracker.cs +++ b/src/Jackett.Common/Indexers/EliteTracker.cs @@ -31,7 +31,7 @@ namespace Jackett.Common.Indexers link: "https://elite-tracker.net/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/EpubLibre.cs b/src/Jackett.Common/Indexers/EpubLibre.cs index e48090411..672437371 100644 --- a/src/Jackett.Common/Indexers/EpubLibre.cs +++ b/src/Jackett.Common/Indexers/EpubLibre.cs @@ -54,7 +54,7 @@ namespace Jackett.Common.Indexers name: "EpubLibre", description: "Más libros, Más libres", link: "https://epublibre.org/", - caps: new TorznabCapabilities(TorznabCatType.BooksEbook), + caps: new TorznabCapabilities(), configService: configService, client: wc, logger: l, @@ -64,6 +64,8 @@ namespace Jackett.Common.Indexers Encoding = Encoding.UTF8; Language = "es-es"; Type = "public"; + + AddCategoryMapping(1, TorznabCatType.BooksEbook); } public override async Task ApplyConfiguration(JToken configJson) diff --git a/src/Jackett.Common/Indexers/FileList.cs b/src/Jackett.Common/Indexers/FileList.cs index 84718f976..69ded78c9 100644 --- a/src/Jackett.Common/Indexers/FileList.cs +++ b/src/Jackett.Common/Indexers/FileList.cs @@ -37,7 +37,7 @@ namespace Jackett.Common.Indexers link: "https://filelist.io/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: wc, diff --git a/src/Jackett.Common/Indexers/FunFile.cs b/src/Jackett.Common/Indexers/FunFile.cs index c6d9aaa78..5c23bce33 100644 --- a/src/Jackett.Common/Indexers/FunFile.cs +++ b/src/Jackett.Common/Indexers/FunFile.cs @@ -30,7 +30,7 @@ namespace Jackett.Common.Indexers link: "https://www.funfile.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/Fuzer.cs b/src/Jackett.Common/Indexers/Fuzer.cs index 03826e0a6..133d23ec1 100644 --- a/src/Jackett.Common/Indexers/Fuzer.cs +++ b/src/Jackett.Common/Indexers/Fuzer.cs @@ -43,7 +43,7 @@ namespace Jackett.Common.Indexers link: "https://www.fuzer.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: w, diff --git a/src/Jackett.Common/Indexers/GazelleGames.cs b/src/Jackett.Common/Indexers/GazelleGames.cs index e62a9ee5e..166b0b244 100644 --- a/src/Jackett.Common/Indexers/GazelleGames.cs +++ b/src/Jackett.Common/Indexers/GazelleGames.cs @@ -280,7 +280,7 @@ namespace Jackett.Common.Indexers continue; var qDetailsLink = Row.QuerySelector("a[href^=\"torrents.php?id=\"]"); var title = qDetailsLink.TextContent.Replace(", Freeleech!", "").Replace(", Neutral Leech!", ""); - if (stickyGroup && (query.ImdbID == null || !TorznabCaps.SupportsImdbMovieSearch) && !query.MatchQueryStringAND(title)) // AND match for sticky releases + if (stickyGroup && (query.ImdbID == null || !TorznabCaps.MovieSearchImdbAvailable) && !query.MatchQueryStringAND(title)) // AND match for sticky releases continue; var qDescription = qDetailsLink.QuerySelector("span.torrent_info_tags"); var qDLLink = Row.QuerySelector("a[href^=\"torrents.php?action=download\"]"); diff --git a/src/Jackett.Common/Indexers/GimmePeers.cs b/src/Jackett.Common/Indexers/GimmePeers.cs index fbfc13d8b..6366df811 100644 --- a/src/Jackett.Common/Indexers/GimmePeers.cs +++ b/src/Jackett.Common/Indexers/GimmePeers.cs @@ -34,7 +34,9 @@ namespace Jackett.Common.Indexers name: "GimmePeers", description: "Formerly ILT", link: "https://www.gimmepeers.com/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/HDBitsApi.cs b/src/Jackett.Common/Indexers/HDBitsApi.cs index b036a1e7d..a67f66141 100644 --- a/src/Jackett.Common/Indexers/HDBitsApi.cs +++ b/src/Jackett.Common/Indexers/HDBitsApi.cs @@ -32,7 +32,7 @@ namespace Jackett.Common.Indexers link: "https://hdbits.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true, + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId }, SupportsTvdbSearch= true }, configService: configService, diff --git a/src/Jackett.Common/Indexers/HDSpace.cs b/src/Jackett.Common/Indexers/HDSpace.cs index d13555f36..6754c0391 100644 --- a/src/Jackett.Common/Indexers/HDSpace.cs +++ b/src/Jackett.Common/Indexers/HDSpace.cs @@ -32,7 +32,7 @@ namespace Jackett.Common.Indexers link: "https://hd-space.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } //SupportsImdbTVSearch = true; (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/HDTorrents.cs b/src/Jackett.Common/Indexers/HDTorrents.cs index ef0bd8075..a08464289 100644 --- a/src/Jackett.Common/Indexers/HDTorrents.cs +++ b/src/Jackett.Common/Indexers/HDTorrents.cs @@ -51,7 +51,7 @@ namespace Jackett.Common.Indexers link: "https://hdts.ru/", // Domain https://hdts.ru/ seems more reliable caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/Hebits.cs b/src/Jackett.Common/Indexers/Hebits.cs index a500a07d7..a4733941e 100644 --- a/src/Jackett.Common/Indexers/Hebits.cs +++ b/src/Jackett.Common/Indexers/Hebits.cs @@ -34,7 +34,9 @@ namespace Jackett.Common.Indexers name: "Hebits", description: "The Israeli Tracker", link: "https://hebits.net/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/IPTorrents.cs b/src/Jackett.Common/Indexers/IPTorrents.cs index e4f269d52..020c62da2 100644 --- a/src/Jackett.Common/Indexers/IPTorrents.cs +++ b/src/Jackett.Common/Indexers/IPTorrents.cs @@ -56,7 +56,7 @@ namespace Jackett.Common.Indexers link: "https://iptorrents.com/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/IceTorrent.cs b/src/Jackett.Common/Indexers/IceTorrent.cs index 339466384..3a6259439 100644 --- a/src/Jackett.Common/Indexers/IceTorrent.cs +++ b/src/Jackett.Common/Indexers/IceTorrent.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Jackett.Common.Indexers.Abstract; using Jackett.Common.Models; @@ -22,7 +23,7 @@ namespace Jackett.Common.Indexers link: "https://icetorrent.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/ImmortalSeed.cs b/src/Jackett.Common/Indexers/ImmortalSeed.cs index 09a532b2c..14a8a29b3 100644 --- a/src/Jackett.Common/Indexers/ImmortalSeed.cs +++ b/src/Jackett.Common/Indexers/ImmortalSeed.cs @@ -39,7 +39,9 @@ namespace Jackett.Common.Indexers name: "ImmortalSeed", description: "ImmortalSeed (iS) is a Private Torrent Tracker for MOVIES / TV / GENERAL", link: "https://immortalseed.me/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/InternetArchive.cs b/src/Jackett.Common/Indexers/InternetArchive.cs index b4de8f57b..0fbffb818 100644 --- a/src/Jackett.Common/Indexers/InternetArchive.cs +++ b/src/Jackett.Common/Indexers/InternetArchive.cs @@ -46,7 +46,9 @@ namespace Jackett.Common.Indexers name: "Internet Archive", description: "Internet Archive is a non-profit digital library offering free universal access to books, movies & music, as well as 406 billion archived web pages", link: "https://archive.org/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/LostFilm.cs b/src/Jackett.Common/Indexers/LostFilm.cs index 08e8be678..9be8d48f6 100644 --- a/src/Jackett.Common/Indexers/LostFilm.cs +++ b/src/Jackett.Common/Indexers/LostFilm.cs @@ -98,7 +98,9 @@ namespace Jackett.Common.Indexers name: "LostFilm.tv", description: "Unique portal about foreign series", link: "https://www.lostfilm.run/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/MejorTorrent.cs b/src/Jackett.Common/Indexers/MejorTorrent.cs index a43d1df89..0795348c2 100644 --- a/src/Jackett.Common/Indexers/MejorTorrent.cs +++ b/src/Jackett.Common/Indexers/MejorTorrent.cs @@ -48,7 +48,9 @@ namespace Jackett.Common.Indexers name: "MejorTorrent", description: "MejorTorrent - Hay veces que un torrent viene mejor! :)", link: "https://www.mejortorrentt.net/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: w, logger: l, diff --git a/src/Jackett.Common/Indexers/Milkie.cs b/src/Jackett.Common/Indexers/Milkie.cs index 5f3db9802..22f89cb1f 100644 --- a/src/Jackett.Common/Indexers/Milkie.cs +++ b/src/Jackett.Common/Indexers/Milkie.cs @@ -28,7 +28,9 @@ namespace Jackett.Common.Indexers name: "Milkie", description: "Milkie.cc (ME) is private torrent tracker for 0day / general", link: "https://milkie.cc/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/MoreThanTV.cs b/src/Jackett.Common/Indexers/MoreThanTV.cs index 7014aa43c..a0354b943 100644 --- a/src/Jackett.Common/Indexers/MoreThanTV.cs +++ b/src/Jackett.Common/Indexers/MoreThanTV.cs @@ -33,15 +33,15 @@ namespace Jackett.Common.Indexers private ConfigurationDataBasicLogin ConfigData => (ConfigurationDataBasicLogin)configData; - public MoreThanTV(IIndexerConfigurationService configService, Utils.Clients.WebClient c, Logger l, IProtectionService ps) + public MoreThanTV(IIndexerConfigurationService configService, WebClient c, Logger l, IProtectionService ps) : base(id: "morethantv", name: "MoreThanTV", description: "Private torrent tracker for TV / MOVIES, and the internal tracker for the release group DRACULA.", link: "https://www.morethantv.me/", - caps: new TorznabCapabilities( - TorznabCatType.Movies, - TorznabCatType.TV, - TorznabCatType.Other), + caps: new TorznabCapabilities + { + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } + }, configService: configService, client: c, logger: l, @@ -52,7 +52,9 @@ namespace Jackett.Common.Indexers Language = "en-us"; Type = "private"; - TorznabCaps.SupportsImdbMovieSearch = true; + AddCategoryMapping(1, TorznabCatType.Movies); + AddCategoryMapping(2, TorznabCatType.TV); + AddCategoryMapping(3, TorznabCatType.Other); } public override async Task ApplyConfiguration(JToken configJson) diff --git a/src/Jackett.Common/Indexers/MyAmity.cs b/src/Jackett.Common/Indexers/MyAmity.cs index cc2ea493c..fc7edd8c0 100644 --- a/src/Jackett.Common/Indexers/MyAmity.cs +++ b/src/Jackett.Common/Indexers/MyAmity.cs @@ -33,7 +33,9 @@ namespace Jackett.Common.Indexers name: "myAmity", description: "A German general tracker.", link: "https://ttv2.myamity.info/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/NCore.cs b/src/Jackett.Common/Indexers/NCore.cs index 1ac71ac05..87602d5b8 100644 --- a/src/Jackett.Common/Indexers/NCore.cs +++ b/src/Jackett.Common/Indexers/NCore.cs @@ -48,7 +48,7 @@ namespace Jackett.Common.Indexers link: "https://ncore.cc/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true, + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // supported by the site but disabled due to #8107 // SupportsImdbTVSearch = true }, @@ -61,6 +61,7 @@ namespace Jackett.Common.Indexers Encoding = Encoding.UTF8; Language = "hu-hu"; Type = "private"; + AddCategoryMapping("xvid_hun", TorznabCatType.MoviesSD, "Film SD/HU"); AddCategoryMapping("xvid", TorznabCatType.MoviesSD, "Film SD/EN"); AddCategoryMapping("dvd_hun", TorznabCatType.MoviesDVD, "Film DVDR/HU"); diff --git a/src/Jackett.Common/Indexers/NewPCT.cs b/src/Jackett.Common/Indexers/NewPCT.cs index 7101ea32d..c5de847f5 100644 --- a/src/Jackett.Common/Indexers/NewPCT.cs +++ b/src/Jackett.Common/Indexers/NewPCT.cs @@ -121,10 +121,9 @@ namespace Jackett.Common.Indexers name: "NewPCT", description: "NewPCT - Descargar peliculas, series y estrenos torrent gratis", link: "https://pctmix.com/", - caps: new TorznabCapabilities(TorznabCatType.TV, - TorznabCatType.TVSD, - TorznabCatType.TVHD, - TorznabCatType.Movies), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, @@ -146,6 +145,11 @@ namespace Jackett.Common.Indexers var removeMovieYearItem = new BoolItem { Name = "Remove year from movie results (enable for Radarr)", Value = false }; configData.AddDynamic("RemoveMovieYear", removeMovieYearItem); + + AddCategoryMapping(1, TorznabCatType.Movies); + AddCategoryMapping(2, TorznabCatType.TV); + AddCategoryMapping(3, TorznabCatType.TVSD); + AddCategoryMapping(4, TorznabCatType.TVHD); } public override async Task ApplyConfiguration(JToken configJson) diff --git a/src/Jackett.Common/Indexers/NewRealWorld.cs b/src/Jackett.Common/Indexers/NewRealWorld.cs index 62d8de361..f305b6c75 100644 --- a/src/Jackett.Common/Indexers/NewRealWorld.cs +++ b/src/Jackett.Common/Indexers/NewRealWorld.cs @@ -34,7 +34,9 @@ namespace Jackett.Common.Indexers name: "New Real World", description: "A German general tracker.", link: "https://nrw-tracker.eu/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/NorBits.cs b/src/Jackett.Common/Indexers/NorBits.cs index 9ec2a99ef..b2ccd5630 100644 --- a/src/Jackett.Common/Indexers/NorBits.cs +++ b/src/Jackett.Common/Indexers/NorBits.cs @@ -49,7 +49,7 @@ namespace Jackett.Common.Indexers link: "https://norbits.net/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List {MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: w, diff --git a/src/Jackett.Common/Indexers/NotWhatCD.cs b/src/Jackett.Common/Indexers/NotWhatCD.cs index 125d52ae6..a3fe6fe3a 100644 --- a/src/Jackett.Common/Indexers/NotWhatCD.cs +++ b/src/Jackett.Common/Indexers/NotWhatCD.cs @@ -18,6 +18,7 @@ namespace Jackett.Common.Indexers link: "https://notwhat.cd/", caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q }, SupportedMusicSearchParamsList = new List { "q", "album", "artist", "label", "year" } }, configService: configService, diff --git a/src/Jackett.Common/Indexers/Orpheus.cs b/src/Jackett.Common/Indexers/Orpheus.cs index 77e67b68e..15965dd43 100644 --- a/src/Jackett.Common/Indexers/Orpheus.cs +++ b/src/Jackett.Common/Indexers/Orpheus.cs @@ -18,6 +18,7 @@ namespace Jackett.Common.Indexers link: "https://orpheus.network/", caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q }, SupportedMusicSearchParamsList = new List { "q", "album", "artist", "label", "year" } }, configService: configService, diff --git a/src/Jackett.Common/Indexers/Partis.cs b/src/Jackett.Common/Indexers/Partis.cs index 3f5e3de55..f7dbbb2f1 100644 --- a/src/Jackett.Common/Indexers/Partis.cs +++ b/src/Jackett.Common/Indexers/Partis.cs @@ -33,7 +33,9 @@ namespace Jackett.Common.Indexers name: "Partis", description: "Partis is a SLOVENIAN Private Torrent Tracker", link: "https://www.partis.si/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/PassThePopcorn.cs b/src/Jackett.Common/Indexers/PassThePopcorn.cs index 43b085f16..44ad7c608 100644 --- a/src/Jackett.Common/Indexers/PassThePopcorn.cs +++ b/src/Jackett.Common/Indexers/PassThePopcorn.cs @@ -38,7 +38,7 @@ namespace Jackett.Common.Indexers link: "https://passthepopcorn.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: c, diff --git a/src/Jackett.Common/Indexers/PirateTheNet.cs b/src/Jackett.Common/Indexers/PirateTheNet.cs index 1e165d407..bd8ba7916 100644 --- a/src/Jackett.Common/Indexers/PirateTheNet.cs +++ b/src/Jackett.Common/Indexers/PirateTheNet.cs @@ -38,7 +38,7 @@ namespace Jackett.Common.Indexers link: "http://piratethenet.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: w, diff --git a/src/Jackett.Common/Indexers/PixelHD.cs b/src/Jackett.Common/Indexers/PixelHD.cs index 617433e90..2eece9ea2 100644 --- a/src/Jackett.Common/Indexers/PixelHD.cs +++ b/src/Jackett.Common/Indexers/PixelHD.cs @@ -39,7 +39,7 @@ namespace Jackett.Common.Indexers link: "https://pixelhd.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, logger: logger, diff --git a/src/Jackett.Common/Indexers/PolishTracker.cs b/src/Jackett.Common/Indexers/PolishTracker.cs index 81c0b4aed..106807aaf 100644 --- a/src/Jackett.Common/Indexers/PolishTracker.cs +++ b/src/Jackett.Common/Indexers/PolishTracker.cs @@ -34,7 +34,7 @@ namespace Jackett.Common.Indexers link: "https://pte.nu/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/PreToMe.cs b/src/Jackett.Common/Indexers/PreToMe.cs index 52ee56bc0..fcf57b215 100644 --- a/src/Jackett.Common/Indexers/PreToMe.cs +++ b/src/Jackett.Common/Indexers/PreToMe.cs @@ -30,7 +30,7 @@ namespace Jackett.Common.Indexers link: "https://pretome.info/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true; (supported by the site but disabled due to #8107) }, client: wc, diff --git a/src/Jackett.Common/Indexers/PrivateHD.cs b/src/Jackett.Common/Indexers/PrivateHD.cs index e123b57d0..4db93fb11 100644 --- a/src/Jackett.Common/Indexers/PrivateHD.cs +++ b/src/Jackett.Common/Indexers/PrivateHD.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Jackett.Common.Indexers.Abstract; using Jackett.Common.Models; @@ -17,7 +18,7 @@ namespace Jackett.Common.Indexers link: "https://privatehd.to/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/PsyTorrents.cs b/src/Jackett.Common/Indexers/PsyTorrents.cs index 3f0b00950..13475c873 100644 --- a/src/Jackett.Common/Indexers/PsyTorrents.cs +++ b/src/Jackett.Common/Indexers/PsyTorrents.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Jackett.Common.Indexers.Abstract; using Jackett.Common.Models; @@ -16,7 +17,9 @@ namespace Jackett.Common.Indexers name: "Psytorrents", description: "Psytorrents (PSY) is a Private Torrent Tracker for ELECTRONIC MUSIC", link: "https://psytorrents.info/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/RarBG.cs b/src/Jackett.Common/Indexers/RarBG.cs index c1dacfc1c..384030cde 100644 --- a/src/Jackett.Common/Indexers/RarBG.cs +++ b/src/Jackett.Common/Indexers/RarBG.cs @@ -38,7 +38,7 @@ namespace Jackett.Common.Indexers link: "https://rarbg.to/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: wc, diff --git a/src/Jackett.Common/Indexers/Redacted.cs b/src/Jackett.Common/Indexers/Redacted.cs index bd391fe9c..af6ef6cef 100644 --- a/src/Jackett.Common/Indexers/Redacted.cs +++ b/src/Jackett.Common/Indexers/Redacted.cs @@ -22,6 +22,7 @@ namespace Jackett.Common.Indexers link: "https://redacted.ch/", caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q }, SupportedMusicSearchParamsList = new List { "q", "album", "artist", "label", "year" } }, configService: configService, diff --git a/src/Jackett.Common/Indexers/RevolutionTT.cs b/src/Jackett.Common/Indexers/RevolutionTT.cs index f9c58e395..a26ac426b 100644 --- a/src/Jackett.Common/Indexers/RevolutionTT.cs +++ b/src/Jackett.Common/Indexers/RevolutionTT.cs @@ -32,7 +32,7 @@ namespace Jackett.Common.Indexers link: "https://revolutiontt.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: wc, diff --git a/src/Jackett.Common/Indexers/RuTracker.cs b/src/Jackett.Common/Indexers/RuTracker.cs index b26a46369..543ea9d0a 100644 --- a/src/Jackett.Common/Indexers/RuTracker.cs +++ b/src/Jackett.Common/Indexers/RuTracker.cs @@ -39,7 +39,9 @@ namespace Jackett.Common.Indexers name: "RuTracker", description: "RuTracker is a Semi-Private Russian torrent site with a thriving file-sharing community", link: "https://rutracker.org/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/SceneFZ.cs b/src/Jackett.Common/Indexers/SceneFZ.cs index 4e857b4b4..8f3c054f3 100644 --- a/src/Jackett.Common/Indexers/SceneFZ.cs +++ b/src/Jackett.Common/Indexers/SceneFZ.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Jackett.Common.Indexers.Abstract; using Jackett.Common.Models; @@ -23,7 +24,7 @@ namespace Jackett.Common.Indexers link: "https://scenefz.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/SceneHD.cs b/src/Jackett.Common/Indexers/SceneHD.cs index 92cf694b9..849a1e1ab 100644 --- a/src/Jackett.Common/Indexers/SceneHD.cs +++ b/src/Jackett.Common/Indexers/SceneHD.cs @@ -33,7 +33,7 @@ namespace Jackett.Common.Indexers configService: configService, caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, client: c, logger: l, diff --git a/src/Jackett.Common/Indexers/SceneTime.cs b/src/Jackett.Common/Indexers/SceneTime.cs index 2e64ccb7e..6e8680b22 100644 --- a/src/Jackett.Common/Indexers/SceneTime.cs +++ b/src/Jackett.Common/Indexers/SceneTime.cs @@ -33,7 +33,9 @@ namespace Jackett.Common.Indexers name: "SceneTime", description: "Always on time", link: "https://www.scenetime.com/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: w, logger: l, diff --git a/src/Jackett.Common/Indexers/SecretCinema.cs b/src/Jackett.Common/Indexers/SecretCinema.cs index e6565bbe5..17e929f92 100644 --- a/src/Jackett.Common/Indexers/SecretCinema.cs +++ b/src/Jackett.Common/Indexers/SecretCinema.cs @@ -21,7 +21,7 @@ namespace Jackett.Common.Indexers link: "https://secret-cinema.pw/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true, + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId }, SupportedMusicSearchParamsList = new List { "q", "album", "artist", "label", "year" } }, configService: configService, diff --git a/src/Jackett.Common/Indexers/Shazbat.cs b/src/Jackett.Common/Indexers/Shazbat.cs index 85f39663a..0d1a4a900 100644 --- a/src/Jackett.Common/Indexers/Shazbat.cs +++ b/src/Jackett.Common/Indexers/Shazbat.cs @@ -36,10 +36,7 @@ namespace Jackett.Common.Indexers name: "Shazbat", description: "Modern indexer", link: "https://www.shazbat.tv/", - caps: new TorznabCapabilities( - TorznabCatType.TV, - TorznabCatType.TVHD, - TorznabCatType.TVSD), + caps: new TorznabCapabilities(), configService: configService, client: c, logger: l, @@ -49,6 +46,10 @@ namespace Jackett.Common.Indexers Encoding = Encoding.UTF8; Language = "en-us"; Type = "private"; + + AddCategoryMapping(1, TorznabCatType.TV); + AddCategoryMapping(2, TorznabCatType.TVSD); + AddCategoryMapping(3, TorznabCatType.TVHD); } public override async Task ApplyConfiguration(JToken configJson) @@ -124,7 +125,7 @@ namespace Jackett.Common.Indexers foreach (var child in titleRow.Children) child.Remove(); release.Title = titleRow.TextContent.Trim(); - if ((query.ImdbID == null || !TorznabCaps.SupportsImdbMovieSearch) && + if ((query.ImdbID == null || !TorznabCaps.MovieSearchImdbAvailable) && !query.MatchQueryStringAND(release.Title)) continue; var bannerStyle = row.QuerySelector("div[style^=\"cursor: pointer; background-image:url\"]") diff --git a/src/Jackett.Common/Indexers/SolidTorrents.cs b/src/Jackett.Common/Indexers/SolidTorrents.cs index cc5d360e5..2cf67a035 100644 --- a/src/Jackett.Common/Indexers/SolidTorrents.cs +++ b/src/Jackett.Common/Indexers/SolidTorrents.cs @@ -40,7 +40,9 @@ namespace Jackett.Common.Indexers name: "Solid Torrents", description: "Solid Torrents is a Public torrent meta-search engine", link: "https://solidtorrents.net/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/SpeedCD.cs b/src/Jackett.Common/Indexers/SpeedCD.cs index 30889a2ea..0bf71b385 100644 --- a/src/Jackett.Common/Indexers/SpeedCD.cs +++ b/src/Jackett.Common/Indexers/SpeedCD.cs @@ -39,7 +39,7 @@ namespace Jackett.Common.Indexers link: "https://speed.cd/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/SuperBits.cs b/src/Jackett.Common/Indexers/SuperBits.cs index 094bad85f..6c7d7bb72 100644 --- a/src/Jackett.Common/Indexers/SuperBits.cs +++ b/src/Jackett.Common/Indexers/SuperBits.cs @@ -36,7 +36,7 @@ namespace Jackett.Common.Indexers link: "https://superbits.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: w, diff --git a/src/Jackett.Common/Indexers/TVStore.cs b/src/Jackett.Common/Indexers/TVStore.cs index 3ecff334b..dc21a66c2 100644 --- a/src/Jackett.Common/Indexers/TVStore.cs +++ b/src/Jackett.Common/Indexers/TVStore.cs @@ -38,7 +38,7 @@ namespace Jackett.Common.Indexers link: "https://tvstore.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true, // Needed for IMDb searches to work see #7977 + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId }, SupportsImdbTVSearch = true }, configService: configService, diff --git a/src/Jackett.Common/Indexers/TVVault.cs b/src/Jackett.Common/Indexers/TVVault.cs index e16ef8ff5..134e32da3 100644 --- a/src/Jackett.Common/Indexers/TVVault.cs +++ b/src/Jackett.Common/Indexers/TVVault.cs @@ -34,7 +34,7 @@ namespace Jackett.Common.Indexers link: "https://tv-vault.me/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/ThePirateBay.cs b/src/Jackett.Common/Indexers/ThePirateBay.cs index 754102605..4c8b5cf1b 100644 --- a/src/Jackett.Common/Indexers/ThePirateBay.cs +++ b/src/Jackett.Common/Indexers/ThePirateBay.cs @@ -74,7 +74,9 @@ namespace Jackett.Common.Indexers name: "The Pirate Bay", description: "Pirate Bay (TPB) is the galaxy’s most resilient Public BitTorrent site", link: "https://thepiratebay.org/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: client, logger: logger, diff --git a/src/Jackett.Common/Indexers/Toloka.cs b/src/Jackett.Common/Indexers/Toloka.cs index ff5fb30ee..28b9c03d7 100644 --- a/src/Jackett.Common/Indexers/Toloka.cs +++ b/src/Jackett.Common/Indexers/Toloka.cs @@ -36,7 +36,9 @@ namespace Jackett.Common.Indexers name: "Toloka.to", description: "Toloka is a Semi-Private Ukrainian torrent site with a thriving file-sharing community", link: "https://toloka.to/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/TorrentBytes.cs b/src/Jackett.Common/Indexers/TorrentBytes.cs index 450c7a1fc..ddd23f7df 100644 --- a/src/Jackett.Common/Indexers/TorrentBytes.cs +++ b/src/Jackett.Common/Indexers/TorrentBytes.cs @@ -31,7 +31,7 @@ namespace Jackett.Common.Indexers link: "https://www.torrentbytes.net/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/TorrentDay.cs b/src/Jackett.Common/Indexers/TorrentDay.cs index 66b8fc39b..ec031cb59 100644 --- a/src/Jackett.Common/Indexers/TorrentDay.cs +++ b/src/Jackett.Common/Indexers/TorrentDay.cs @@ -53,7 +53,7 @@ namespace Jackett.Common.Indexers link: "https://tday.love/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, @@ -171,7 +171,7 @@ namespace Jackett.Common.Indexers foreach (var row in rows) { var title = (string)row.name; - if ((!query.IsImdbQuery || !TorznabCaps.SupportsImdbMovieSearch) && !query.MatchQueryStringAND(title)) + if ((!query.IsImdbQuery || !TorznabCaps.MovieSearchImdbAvailable) && !query.MatchQueryStringAND(title)) continue; var torrentId = (long)row.t; var comments = new Uri(SiteLink + "details.php?id=" + torrentId); diff --git a/src/Jackett.Common/Indexers/TorrentHeaven.cs b/src/Jackett.Common/Indexers/TorrentHeaven.cs index 8b23ef8a5..d5ffca38a 100644 --- a/src/Jackett.Common/Indexers/TorrentHeaven.cs +++ b/src/Jackett.Common/Indexers/TorrentHeaven.cs @@ -25,7 +25,9 @@ namespace Jackett.Common.Indexers name: "TorrentHeaven", description: "A German general tracker.", link: "https://newheaven.nl/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/TorrentLeech.cs b/src/Jackett.Common/Indexers/TorrentLeech.cs index 31f223a96..394173980 100644 --- a/src/Jackett.Common/Indexers/TorrentLeech.cs +++ b/src/Jackett.Common/Indexers/TorrentLeech.cs @@ -38,7 +38,7 @@ namespace Jackett.Common.Indexers link: "https://www.torrentleech.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/TorrentMafya.cs b/src/Jackett.Common/Indexers/TorrentMafya.cs index 8c2f2ee4e..60d3947bf 100644 --- a/src/Jackett.Common/Indexers/TorrentMafya.cs +++ b/src/Jackett.Common/Indexers/TorrentMafya.cs @@ -36,7 +36,9 @@ namespace Jackett.Common.Indexers name: "TorrentMafya", description: "TorrentMafya is a Turkish general torrent tracker ", link: "https://www.torrentmafya.org/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/TorrentNetwork.cs b/src/Jackett.Common/Indexers/TorrentNetwork.cs index 3574ac4b2..541dabf73 100644 --- a/src/Jackett.Common/Indexers/TorrentNetwork.cs +++ b/src/Jackett.Common/Indexers/TorrentNetwork.cs @@ -38,7 +38,9 @@ namespace Jackett.Common.Indexers name: "Torrent Network", description: "Torrent Network (TN) is a GERMAN Private site for TV / MOVIES / GENERAL", link: "https://tntracker.org/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/TorrentSeeds.cs b/src/Jackett.Common/Indexers/TorrentSeeds.cs index 8768a7d37..111e9db52 100644 --- a/src/Jackett.Common/Indexers/TorrentSeeds.cs +++ b/src/Jackett.Common/Indexers/TorrentSeeds.cs @@ -32,7 +32,9 @@ namespace Jackett.Common.Indexers name: "TorrentSeeds", description: "TorrentSeeds is a Private site for MOVIES / TV / GENERAL", link: "https://torrentseeds.org/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities{ + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: wc, logger: l, diff --git a/src/Jackett.Common/Indexers/TorrentSyndikat.cs b/src/Jackett.Common/Indexers/TorrentSyndikat.cs index 9708fd08c..9eb101891 100644 --- a/src/Jackett.Common/Indexers/TorrentSyndikat.cs +++ b/src/Jackett.Common/Indexers/TorrentSyndikat.cs @@ -37,7 +37,7 @@ namespace Jackett.Common.Indexers link: "https://torrent-syndikat.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: w, @@ -101,8 +101,8 @@ namespace Jackett.Common.Indexers var releases = await PerformQuery(new TorznabQuery()); await ConfigureIfOK( - string.Empty, - releases.Any(), + string.Empty, + releases.Any(), () => throw new Exception("Could not find any releases")); return IndexerConfigurationStatus.Completed; @@ -223,7 +223,7 @@ namespace Jackett.Common.Indexers { release.Description = string.Join(Environment.NewLine, descriptions); } - + releases.Add(release); } } diff --git a/src/Jackett.Common/Indexers/XSpeeds.cs b/src/Jackett.Common/Indexers/XSpeeds.cs index a2b9de0f9..7906c2d53 100644 --- a/src/Jackett.Common/Indexers/XSpeeds.cs +++ b/src/Jackett.Common/Indexers/XSpeeds.cs @@ -36,7 +36,7 @@ namespace Jackett.Common.Indexers link: "https://www.xspeeds.eu/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/Xthor.cs b/src/Jackett.Common/Indexers/Xthor.cs index adda0e449..ebd37c2ac 100644 --- a/src/Jackett.Common/Indexers/Xthor.cs +++ b/src/Jackett.Common/Indexers/Xthor.cs @@ -46,7 +46,9 @@ namespace Jackett.Common.Indexers name: "Xthor", description: "General French Private Tracker", link: "https://xthor.tk/", - caps: new TorznabCapabilities(), + caps: new TorznabCapabilities { + MovieSearchParams = new List { MovieSearchParam.Q } + }, configService: configService, client: w, logger: l, diff --git a/src/Jackett.Common/Indexers/XtremeZone.cs b/src/Jackett.Common/Indexers/XtremeZone.cs index 6dcf7ba8c..14e0930bb 100644 --- a/src/Jackett.Common/Indexers/XtremeZone.cs +++ b/src/Jackett.Common/Indexers/XtremeZone.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Jackett.Common.Indexers.Abstract; using Jackett.Common.Models; @@ -23,7 +24,7 @@ namespace Jackett.Common.Indexers link: "https://myxz.eu/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } // SupportsImdbTVSearch = true (supported by the site but disabled due to #8107) }, configService: configService, diff --git a/src/Jackett.Common/Indexers/YTS.cs b/src/Jackett.Common/Indexers/YTS.cs index 9a2a990fe..e3f27caad 100644 --- a/src/Jackett.Common/Indexers/YTS.cs +++ b/src/Jackett.Common/Indexers/YTS.cs @@ -40,7 +40,7 @@ namespace Jackett.Common.Indexers link: "https://yts.mx/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId } }, configService: configService, client: wc, diff --git a/src/Jackett.Common/Models/TorznabCapabilities.cs b/src/Jackett.Common/Models/TorznabCapabilities.cs index 8afc24a46..513c9f498 100644 --- a/src/Jackett.Common/Models/TorznabCapabilities.cs +++ b/src/Jackett.Common/Models/TorznabCapabilities.cs @@ -5,6 +5,13 @@ using System.Xml.Linq; namespace Jackett.Common.Models { + public enum MovieSearchParam + { + Q, + ImdbId, + TmdbId + } + public class TorznabCapabilities { public int? LimitsMax { get; set; } @@ -13,20 +20,17 @@ namespace Jackett.Common.Models public bool SearchAvailable { get; set; } public bool TVSearchAvailable { get; set; } - - public bool MovieSearchAvailable { get; set; } - - public bool SupportsTVRageSearch { get; set; } - public bool SupportsTvdbSearch { get; set; } - - public bool SupportsImdbMovieSearch { get; set; } - public bool SupportsTmdbMovieSearch { get; set; } - public bool SupportsImdbTVSearch { get; set; } + public bool SupportsTvdbSearch { get; set; } + public bool SupportsTVRageSearch { get; set; } - public bool MusicSearchAvailable => (SupportedMusicSearchParamsList.Count > 0); + public List MovieSearchParams; + public bool MovieSearchAvailable => (MovieSearchParams.Count > 0); + public bool MovieSearchImdbAvailable => (MovieSearchParams.Contains(MovieSearchParam.ImdbId)); + public bool MovieSearchTmdbAvailable => (MovieSearchParams.Contains(MovieSearchParam.TmdbId)); public List SupportedMusicSearchParamsList; + public bool MusicSearchAvailable => (SupportedMusicSearchParamsList.Count > 0); public bool BookSearchAvailable { get; set; } @@ -34,33 +38,15 @@ namespace Jackett.Common.Models public TorznabCapabilities() { - Categories = new List(); SearchAvailable = true; TVSearchAvailable = true; - MovieSearchAvailable = false; - SupportsTVRageSearch = false; - SupportsTvdbSearch = false; - SupportsImdbMovieSearch = false; - SupportsTmdbMovieSearch = false; SupportsImdbTVSearch = false; - SupportedMusicSearchParamsList = new List(); - BookSearchAvailable = false; - } - - public TorznabCapabilities(params TorznabCategory[] cats) - { - SearchAvailable = true; - TVSearchAvailable = true; - SupportsTVRageSearch = false; SupportsTvdbSearch = false; - SupportsImdbMovieSearch = false; - SupportsTmdbMovieSearch = false; - SupportsImdbTVSearch = false; + SupportsTVRageSearch = false; + MovieSearchParams = new List(); SupportedMusicSearchParamsList = new List(); BookSearchAvailable = false; Categories = new List(); - Categories.AddRange(cats); - MovieSearchAvailable = Categories.Any(i => TorznabCatType.Movies.Contains(i)); } private string SupportedTVSearchParams @@ -68,27 +54,39 @@ namespace Jackett.Common.Models get { var parameters = new List() { "q", "season", "ep" }; - if (SupportsTVRageSearch) - parameters.Add("rid"); - if (SupportsTvdbSearch) - parameters.Add("tvdbid"); if (SupportsImdbTVSearch) parameters.Add("imdbid"); + if (SupportsTvdbSearch) + parameters.Add("tvdbid"); + if (SupportsTVRageSearch) + parameters.Add("rid"); return string.Join(",", parameters); } } - private string SupportedMovieSearchParams + public void ParseMovieSearchParams(IEnumerable paramsList) { - get - { - var parameters = new List() { "q" }; - if (SupportsImdbMovieSearch) - parameters.Add("imdbid"); - if (SupportsTmdbMovieSearch) - parameters.Add("tmdbid"); - return string.Join(",", parameters); - } + if (paramsList == null) + return; + foreach (var paramStr in paramsList) + if (Enum.TryParse(paramStr, true, out MovieSearchParam param)) + if (!MovieSearchParams.Contains(param)) + MovieSearchParams.Add(param); + else + throw new Exception($"Duplicate movie-search param: {paramStr}"); + else + throw new Exception($"Not supported movie-search param: {paramStr}"); + } + + private string SupportedMovieSearchParams() + { + // TODO: always enable q? It can't be disabled + var parameters = new List { "q" }; + if (MovieSearchImdbAvailable) + parameters.Add("imdbid"); + if (MovieSearchTmdbAvailable) + parameters.Add("tmdbid"); + return string.Join(",", parameters); } private string SupportedMusicSearchParams => string.Join(",", SupportedMusicSearchParamsList); @@ -137,7 +135,7 @@ namespace Jackett.Common.Models ), new XElement("movie-search", new XAttribute("available", MovieSearchAvailable ? "yes" : "no"), - new XAttribute("supportedParams", SupportedMovieSearchParams) + new XAttribute("supportedParams", SupportedMovieSearchParams()) ), new XElement("music-search", new XAttribute("available", MusicSearchAvailable ? "yes" : "no"), @@ -177,15 +175,13 @@ namespace Jackett.Common.Models { lhs.SearchAvailable = lhs.SearchAvailable || rhs.SearchAvailable; lhs.TVSearchAvailable = lhs.TVSearchAvailable || rhs.TVSearchAvailable; - lhs.MovieSearchAvailable = lhs.MovieSearchAvailable || rhs.MovieSearchAvailable; - lhs.BookSearchAvailable = lhs.BookSearchAvailable || rhs.BookSearchAvailable; - lhs.SupportsTVRageSearch = lhs.SupportsTVRageSearch || rhs.SupportsTVRageSearch; - lhs.SupportsTvdbSearch = lhs.SupportsTvdbSearch || rhs.SupportsTvdbSearch; - lhs.SupportsImdbMovieSearch = lhs.SupportsImdbMovieSearch || rhs.SupportsImdbMovieSearch; - lhs.SupportsTmdbMovieSearch = lhs.SupportsTmdbMovieSearch || rhs.SupportsTmdbMovieSearch; lhs.SupportsImdbTVSearch = lhs.SupportsImdbTVSearch || rhs.SupportsImdbTVSearch; + lhs.SupportsTvdbSearch = lhs.SupportsTvdbSearch || rhs.SupportsTvdbSearch; + lhs.SupportsTVRageSearch = lhs.SupportsTVRageSearch || rhs.SupportsTVRageSearch; + lhs.MovieSearchParams = lhs.MovieSearchParams.Union(rhs.MovieSearchParams).ToList(); + // TODO: add music search + lhs.BookSearchAvailable = lhs.BookSearchAvailable || rhs.BookSearchAvailable; lhs.Categories.AddRange(rhs.Categories.Where(x => x.ID < 100000).Except(lhs.Categories)); // exclude indexer specific categories (>= 100000) - return lhs; } } diff --git a/src/Jackett.Server/Controllers/ResultsController.cs b/src/Jackett.Server/Controllers/ResultsController.cs index 0b018e1be..f0efa8a40 100644 --- a/src/Jackett.Server/Controllers/ResultsController.cs +++ b/src/Jackett.Server/Controllers/ResultsController.cs @@ -352,7 +352,7 @@ namespace Jackett.Server.Controllers return GetErrorXML(201, "Incorrect parameter: invalid imdbid format"); } - if (CurrentQuery.IsMovieSearch && !CurrentIndexer.TorznabCaps.SupportsImdbMovieSearch) + if (CurrentQuery.IsMovieSearch && !CurrentIndexer.TorznabCaps.MovieSearchImdbAvailable) { logger.Warn($"A search request with imdbid from {Request.HttpContext.Connection.RemoteIpAddress} was made but the indexer {CurrentIndexer.DisplayName} doesn't support it."); return GetErrorXML(203, "Function Not Available: imdbid is not supported for movie search by this indexer"); @@ -367,7 +367,7 @@ namespace Jackett.Server.Controllers if (CurrentQuery.TmdbID != null) { - if (CurrentQuery.IsMovieSearch && !CurrentIndexer.TorznabCaps.SupportsTmdbMovieSearch) + if (CurrentQuery.IsMovieSearch && !CurrentIndexer.TorznabCaps.MovieSearchTmdbAvailable) { logger.Warn($"A search request with tmdbid from {Request.HttpContext.Connection.RemoteIpAddress} was made but the indexer {CurrentIndexer.DisplayName} doesn't support it."); return GetErrorXML(203, "Function Not Available: tmdbid is not supported for movie search by this indexer"); diff --git a/src/Jackett.Test/Common/Models/TorznabCapabilitiesTests.cs b/src/Jackett.Test/Common/Models/TorznabCapabilitiesTests.cs index 20fdae747..cae837150 100644 --- a/src/Jackett.Test/Common/Models/TorznabCapabilitiesTests.cs +++ b/src/Jackett.Test/Common/Models/TorznabCapabilitiesTests.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using Jackett.Common.Models; @@ -12,46 +13,63 @@ namespace Jackett.Test.Common.Models [Test] public void TestConstructors() { - - // TODO: re-order atrributes in TorznabCapabilities // TODO: tv search should be disabled by default - // TODO: TorznabCapabilities(params TorznabCategory[] cats) should re-use TorznabCapabilities // TODO: initialize MusicSearchAvailable var torznabCaps = new TorznabCapabilities(); Assert.True(torznabCaps.SearchAvailable); + Assert.True(torznabCaps.TVSearchAvailable); - Assert.False(torznabCaps.MovieSearchAvailable); - Assert.False(torznabCaps.MusicSearchAvailable); // init - Assert.False(torznabCaps.BookSearchAvailable); - Assert.False(torznabCaps.SupportsImdbMovieSearch); Assert.False(torznabCaps.SupportsImdbTVSearch); Assert.False(torznabCaps.SupportsTvdbSearch); - Assert.False(torznabCaps.SupportsTmdbMovieSearch); Assert.False(torznabCaps.SupportsTVRageSearch); - Assert.AreEqual(0, torznabCaps.SupportedMusicSearchParamsList.Count); - Assert.AreEqual(0, torznabCaps.Categories.Count); - var cats = new TorznabCategory[0]; // empty - torznabCaps = new TorznabCapabilities(cats); - Assert.True(torznabCaps.SearchAvailable); - Assert.True(torznabCaps.TVSearchAvailable); + Assert.IsEmpty(torznabCaps.MovieSearchParams); Assert.False(torznabCaps.MovieSearchAvailable); - Assert.False(torznabCaps.MusicSearchAvailable); // init - Assert.False(torznabCaps.BookSearchAvailable); - Assert.False(torznabCaps.SupportsImdbMovieSearch); - Assert.False(torznabCaps.SupportsImdbTVSearch); - Assert.False(torznabCaps.SupportsTvdbSearch); - Assert.False(torznabCaps.SupportsTmdbMovieSearch); - Assert.False(torznabCaps.SupportsTVRageSearch); - Assert.AreEqual(0, torznabCaps.SupportedMusicSearchParamsList.Count); - Assert.AreEqual(0, torznabCaps.Categories.Count); + Assert.False(torznabCaps.MovieSearchImdbAvailable); + Assert.False(torznabCaps.MovieSearchTmdbAvailable); - // TODO: movies category enables Movies Search ?? - cats = new [] { TorznabCatType.MoviesSD }; - torznabCaps = new TorznabCapabilities(cats); - Assert.AreEqual(1, torznabCaps.Categories.Count); - Assert.AreEqual( TorznabCatType.MoviesSD, torznabCaps.Categories[0]); - Assert.True(torznabCaps.MovieSearchAvailable); + Assert.IsEmpty(torznabCaps.SupportedMusicSearchParamsList); + Assert.False(torznabCaps.MusicSearchAvailable); // init + + Assert.False(torznabCaps.BookSearchAvailable); + + Assert.IsEmpty(torznabCaps.Categories); + } + + [Test] + public void TestParseMovieSearchParams() + { + var torznabCaps = new TorznabCapabilities(); + torznabCaps.ParseMovieSearchParams(null); + Assert.IsEmpty(torznabCaps.MovieSearchParams); + + torznabCaps = new TorznabCapabilities(); + torznabCaps.ParseMovieSearchParams(new List()); + Assert.IsEmpty(torznabCaps.MovieSearchParams); + + torznabCaps = new TorznabCapabilities(); + torznabCaps.ParseMovieSearchParams(new List {"q", "imdbid"}); + Assert.AreEqual(new List { MovieSearchParam.Q, MovieSearchParam.ImdbId }, torznabCaps.MovieSearchParams); + + torznabCaps = new TorznabCapabilities(); + try { + torznabCaps.ParseMovieSearchParams(new List {"q", "q"}); // duplicate param + Assert.Fail(); + } + catch (Exception) + { + // ignored + } + + torznabCaps = new TorznabCapabilities(); + try { + torznabCaps.ParseMovieSearchParams(new List {"bad"}); // unsupported param + Assert.Fail(); + } + catch (Exception) + { + // ignored + } } [Test] @@ -94,21 +112,19 @@ namespace Jackett.Test.Common.Models { SearchAvailable = true, TVSearchAvailable = true, - MovieSearchAvailable = true, - BookSearchAvailable = true, - SupportsImdbMovieSearch = true, SupportsImdbTVSearch = true, SupportsTvdbSearch = true, - SupportsTmdbMovieSearch = true, SupportsTVRageSearch = true, - SupportedMusicSearchParamsList = new List{"q", "album", "artist", "label", "year"} + MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.ImdbId, MovieSearchParam.TmdbId }, + SupportedMusicSearchParamsList = new List{"q", "album", "artist", "label", "year"}, + BookSearchAvailable = true }; xDocument = torznabCaps.GetXDocument(); xDoumentSearching = xDocument.Root?.Element("searching"); Assert.AreEqual("yes", xDoumentSearching?.Element("search")?.Attribute("available")?.Value); Assert.AreEqual("q", xDoumentSearching?.Element("search")?.Attribute("supportedParams")?.Value); Assert.AreEqual("yes", xDoumentSearching?.Element("tv-search")?.Attribute("available")?.Value); - Assert.AreEqual("q,season,ep,rid,tvdbid,imdbid", xDoumentSearching?.Element("tv-search")?.Attribute("supportedParams")?.Value); + Assert.AreEqual("q,season,ep,imdbid,tvdbid,rid", xDoumentSearching?.Element("tv-search")?.Attribute("supportedParams")?.Value); Assert.AreEqual("yes", xDoumentSearching?.Element("movie-search")?.Attribute("available")?.Value); Assert.AreEqual("q,imdbid,tmdbid", xDoumentSearching?.Element("movie-search")?.Attribute("supportedParams")?.Value); Assert.AreEqual("yes", xDoumentSearching?.Element("music-search")?.Attribute("available")?.Value); @@ -119,7 +135,10 @@ namespace Jackett.Test.Common.Models Assert.AreEqual("q,author,title", xDoumentSearching?.Element("book-search")?.Attribute("supportedParams")?.Value); // test categories - torznabCaps = new TorznabCapabilities(new [] { TorznabCatType.MoviesSD }); // child category + torznabCaps = new TorznabCapabilities + { + Categories = {TorznabCatType.MoviesSD} // child category + }; xDocument = torznabCaps.GetXDocument(); var xDoumentCategories = xDocument.Root?.Element("categories")?.Elements("category").ToList(); Assert.AreEqual(1, xDoumentCategories?.Count); @@ -127,7 +146,10 @@ namespace Jackett.Test.Common.Models Assert.AreEqual(TorznabCatType.MoviesSD.Name, xDoumentCategories?.First().Attribute("name")?.Value); // TODO: child category is duplicated. should we add just parent and child without other subcats? - torznabCaps = new TorznabCapabilities(new [] { TorznabCatType.Movies, TorznabCatType.MoviesSD }); // parent and child category + torznabCaps = new TorznabCapabilities + { + Categories = {TorznabCatType.Movies, TorznabCatType.MoviesSD} // parent and child category + }; xDocument = torznabCaps.GetXDocument(); xDoumentCategories = xDocument.Root?.Element("categories")?.Elements("category").ToList(); Assert.AreEqual(2, xDoumentCategories?.Count); @@ -141,12 +163,9 @@ namespace Jackett.Test.Common.Models Assert.AreEqual(TorznabCatType.MoviesForeign.Name, xDoumentSubCategories?.First().Attribute("name")?.Value); // TODO: review Torznab spec about custom cats => https://github.com/Sonarr/Sonarr/wiki/Implementing-a-Torznab-indexer#caps-endpoint - // TODO: orderby is not working - torznabCaps = new TorznabCapabilities(new [] - { - new TorznabCategory(100001, "CustomCat"), - TorznabCatType.MoviesSD - }); // custom category + torznabCaps = new TorznabCapabilities{ + Categories = {new TorznabCategory(100001, "CustomCat"), TorznabCatType.MoviesSD} // custom category + }; xDocument = torznabCaps.GetXDocument(); xDoumentCategories = xDocument.Root?.Element("categories")?.Elements("category").ToList(); Assert.AreEqual(2, xDoumentCategories?.Count); @@ -155,5 +174,8 @@ namespace Jackett.Test.Common.Models Assert.AreEqual(TorznabCatType.MoviesSD.ID.ToString(), xDoumentCategories?[1].Attribute("id")?.Value); Assert.AreEqual(TorznabCatType.MoviesSD.Name, xDoumentCategories?[1].Attribute("name")?.Value); } + + // TODO: test concatenation + // TODO: test SupportsCategories } } diff --git a/src/Jackett.Test/Torznab/TorznabTests.cs b/src/Jackett.Test/Torznab/TorznabTests.cs index 51fd3bd88..efeac8a47 100644 --- a/src/Jackett.Test/Torznab/TorznabTests.cs +++ b/src/Jackett.Test/Torznab/TorznabTests.cs @@ -43,24 +43,22 @@ namespace Jackett.Test.Torznab Assert.True(TorznabCaps.SearchAvailable); Assert.True(TorznabCaps.TVSearchAvailable); - Assert.False(TorznabCaps.MovieSearchAvailable); - Assert.False(TorznabCaps.MusicSearchAvailable); - Assert.False(TorznabCaps.BookSearchAvailable); - Assert.False(TorznabCaps.SupportsImdbMovieSearch); Assert.False(TorznabCaps.SupportsImdbTVSearch); Assert.False(TorznabCaps.SupportsTvdbSearch); - Assert.False(TorznabCaps.SupportsTmdbMovieSearch); Assert.False(TorznabCaps.SupportsTVRageSearch); - Assert.AreEqual(0, TorznabCaps.SupportedMusicSearchParamsList.Count); + Assert.IsEmpty(TorznabCaps.MovieSearchParams); + Assert.False(TorznabCaps.MovieSearchAvailable); + Assert.False(TorznabCaps.MovieSearchImdbAvailable); + Assert.False(TorznabCaps.MovieSearchTmdbAvailable); + Assert.IsEmpty(TorznabCaps.SupportedMusicSearchParamsList); + Assert.False(TorznabCaps.MusicSearchAvailable); + Assert.False(TorznabCaps.BookSearchAvailable); - // TODO: movies category enables MovieSearchAvailable but other categories like tv or books don't // add "int" category (parent category) AddCategoryMapping(1, TorznabCatType.Movies); Assert.AreEqual(1, TorznabCaps.Categories.Count); Assert.AreEqual(2000, TorznabCaps.Categories[0].ID); - Assert.True(TorznabCaps.MovieSearchAvailable); - // add "string" category (child category) AddCategoryMapping("mov_sd", TorznabCatType.MoviesSD); Assert.AreEqual(2, TorznabCaps.Categories.Count); @@ -257,15 +255,16 @@ namespace Jackett.Test.Torznab // TODO: make sure TVSearchAvailable is false by default Assert.True(indexer.TorznabCaps.SearchAvailable); Assert.True(indexer.TorznabCaps.TVSearchAvailable); - Assert.False(indexer.TorznabCaps.MovieSearchAvailable); - Assert.False(indexer.TorznabCaps.MusicSearchAvailable); - Assert.False(indexer.TorznabCaps.BookSearchAvailable); - Assert.False(indexer.TorznabCaps.SupportsImdbMovieSearch); Assert.False(indexer.TorznabCaps.SupportsImdbTVSearch); Assert.False(indexer.TorznabCaps.SupportsTvdbSearch); - Assert.False(indexer.TorznabCaps.SupportsTmdbMovieSearch); Assert.False(indexer.TorznabCaps.SupportsTVRageSearch); - Assert.AreEqual(0, indexer.TorznabCaps.SupportedMusicSearchParamsList.Count); + Assert.IsEmpty(indexer.TorznabCaps.MovieSearchParams); + Assert.False(indexer.TorznabCaps.MovieSearchAvailable); + Assert.False(indexer.TorznabCaps.MovieSearchImdbAvailable); + Assert.False(indexer.TorznabCaps.MovieSearchTmdbAvailable); + Assert.IsEmpty(indexer.TorznabCaps.SupportedMusicSearchParamsList); + Assert.False(indexer.TorznabCaps.MusicSearchAvailable); + Assert.False(indexer.TorznabCaps.BookSearchAvailable); definition = new IndexerDefinition // test categories (same as in C# indexer) { @@ -305,9 +304,7 @@ namespace Jackett.Test.Torznab }; indexer = new CardigannIndexer(null, null, null, null, definition); - // TODO: movies category enables MovieSearchAvailable but other categories like tv or books don't // TODO: test duplicates - Assert.True(indexer.TorznabCaps.MovieSearchAvailable); Assert.AreEqual(7, indexer.TorznabCaps.Categories.Count); Assert.AreEqual(2000, indexer.TorznabCaps.Categories[0].ID); Assert.AreEqual(2030, indexer.TorznabCaps.Categories[1].ID); @@ -339,18 +336,22 @@ namespace Jackett.Test.Torznab Assert.True(indexer.TorznabCaps.SearchAvailable); Assert.True(indexer.TorznabCaps.TVSearchAvailable); - // TODO: movie search can't be enabled with the mode, only with movies categories - Assert.False(indexer.TorznabCaps.MovieSearchAvailable); - Assert.True(indexer.TorznabCaps.MusicSearchAvailable); - Assert.True(indexer.TorznabCaps.BookSearchAvailable); - Assert.True(indexer.TorznabCaps.SupportsImdbMovieSearch); - // TODO: this is disabled in Jackett.Common\Indexers\CardigannIndexer.cs : 114 + // TODO: SupportsImdbTVSearch is disabled in Jackett.Common\Indexers\CardigannIndexer.cs : 114 Assert.False(indexer.TorznabCaps.SupportsImdbTVSearch); Assert.True(indexer.TorznabCaps.SupportsTvdbSearch); - Assert.True(indexer.TorznabCaps.SupportsTmdbMovieSearch); // TODO: TVRage search is not implemented in Cardigann Assert.False(indexer.TorznabCaps.SupportsTVRageSearch); + Assert.AreEqual( + new List { MovieSearchParam.Q, MovieSearchParam.ImdbId, MovieSearchParam.TmdbId }, + indexer.TorznabCaps.MovieSearchParams + ); + Assert.True(indexer.TorznabCaps.MovieSearchAvailable); + Assert.True(indexer.TorznabCaps.MovieSearchImdbAvailable); + Assert.True(indexer.TorznabCaps.MovieSearchTmdbAvailable); + // TODO: improve this assert Assert.AreEqual(5, indexer.TorznabCaps.SupportedMusicSearchParamsList.Count); + Assert.True(indexer.TorznabCaps.MusicSearchAvailable); + Assert.True(indexer.TorznabCaps.BookSearchAvailable); // test Jackett UI categories (internal JSON) => same code path as C# indexer // test Torznab caps (XML) => same code path as C# indexer