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;