From 973aca364691fb2215030dcc0fea2743c38b3f01 Mon Sep 17 00:00:00 2001 From: Jonas Stendahl Date: Sun, 27 Sep 2020 01:34:20 +0200 Subject: [PATCH] Add TVDB support to HDBits API indexer (#9659) --- src/Jackett.Common/Indexers/HDBitsApi.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Indexers/HDBitsApi.cs b/src/Jackett.Common/Indexers/HDBitsApi.cs index f6d4f8986..ea5138cbf 100644 --- a/src/Jackett.Common/Indexers/HDBitsApi.cs +++ b/src/Jackett.Common/Indexers/HDBitsApi.cs @@ -32,7 +32,8 @@ namespace Jackett.Common.Indexers link: "https://hdbits.org/", caps: new TorznabCapabilities { - SupportsImdbMovieSearch = true + SupportsImdbMovieSearch = true, + SupportsTvdbSearch= true }, configService: configService, client: wc, @@ -87,6 +88,21 @@ namespace Jackett.Common.Indexers requestData["imdb"] = new JObject(); requestData["imdb"]["id"] = imdbId; } + else if (query.TvdbID != null) + { + requestData["tvdb"] = new JObject(); + requestData["tvdb"]["id"] = query.TvdbID; + + if (query.Season != 0) + { + requestData["tvdb"]["season"] = query.Season; + } + + if (!string.IsNullOrEmpty(query.Episode)) + { + requestData["tvdb"]["episode"] = query.Episode; + } + } else if (!string.IsNullOrWhiteSpace(queryString)) { requestData["search"] = queryString;