BTN: add tvdbid to tvsearch. (#13683) resolves #13576

This commit is contained in:
garfield69 2022-11-09 07:46:56 +13:00 committed by GitHub
parent 3a004dcde4
commit 0c2c043554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,7 @@ namespace Jackett.Common.Indexers
[ExcludeFromCodeCoverage] [ExcludeFromCodeCoverage]
public class BroadcasTheNet : BaseWebIndexer public class BroadcasTheNet : BaseWebIndexer
{ {
// Docs at http://apidocs.broadcasthe.net/docs.php // based on https://github.com/Prowlarr/Prowlarr/tree/develop/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet
private readonly string APIBASE = "https://api.broadcasthe.net"; private readonly string APIBASE = "https://api.broadcasthe.net";
// TODO: remove ConfigurationDataAPIKey class and use ConfigurationDataPasskey instead // TODO: remove ConfigurationDataAPIKey class and use ConfigurationDataPasskey instead
@ -40,7 +40,7 @@ namespace Jackett.Common.Indexers
LimitsMax = 1000, LimitsMax = 1000,
TvSearchParams = new List<TvSearchParam> TvSearchParams = new List<TvSearchParam>
{ {
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.TvdbId
} }
}, },
configService: configService, configService: configService,
@ -103,6 +103,8 @@ namespace Jackett.Common.Indexers
var releases = new List<ReleaseInfo>(); var releases = new List<ReleaseInfo>();
var searchParam = new Dictionary<string, string>(); var searchParam = new Dictionary<string, string>();
if (query.IsTvdbSearch)
searchParam["tvdb"] = string.Format("{0}", query.TvdbID);
searchParam["search"] = searchString.Replace(" ", "%"); searchParam["search"] = searchString.Replace(" ", "%");
var parameters = new JArray var parameters = new JArray