cardigann: Add TVDbId, TMDbId Query Support (#9102)

This commit is contained in:
Qstick
2020-08-16 18:07:04 -04:00
committed by GitHub
parent df91bd4573
commit f8ad109b78
14 changed files with 103 additions and 32 deletions

View File

@@ -365,6 +365,24 @@ namespace Jackett.Server.Controllers
}
}
if (CurrentQuery.TmdbID != null)
{
if (CurrentQuery.IsMovieSearch && !CurrentIndexer.TorznabCaps.SupportsTmdbMovieSearch)
{
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");
}
}
if (CurrentQuery.TvdbID != null)
{
if (CurrentQuery.IsTVSearch && !CurrentIndexer.TorznabCaps.SupportsTvdbSearch)
{
logger.Warn($"A search request with tvdbid from {Request.HttpContext.Connection.RemoteIpAddress} was made but the indexer {CurrentIndexer.DisplayName} doesn't support it.");
return GetErrorXML(203, "Function Not Available: tvdbid is not supported for movie search by this indexer");
}
}
try
{
var result = await CurrentIndexer.ResultsForQuery(CurrentQuery);