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
This commit is contained in:
Diego Heras
2020-10-18 19:26:22 +02:00
committed by GitHub
parent 1fcd467996
commit 9cdad3de64
94 changed files with 332 additions and 235 deletions

View File

@@ -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> { 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<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)