From 06bf11b64eb79030326c8c5c2961a006643ac412 Mon Sep 17 00:00:00 2001 From: kaso17 Date: Mon, 26 Mar 2018 12:42:23 +0200 Subject: [PATCH] remove movie-search limitation for imdbid --- src/Jackett/Controllers/ResultsController.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Jackett/Controllers/ResultsController.cs b/src/Jackett/Controllers/ResultsController.cs index 5a25488b4..47a0d5c96 100644 --- a/src/Jackett/Controllers/ResultsController.cs +++ b/src/Jackett/Controllers/ResultsController.cs @@ -250,28 +250,22 @@ namespace Jackett.Controllers if (CurrentQuery.ImdbID != null) { - if (CurrentQuery.QueryType != "movie") - { - logger.Warn($"A non movie request with an imdbid was made from {Request.GetOwinContext().Request.RemoteIpAddress}."); - return GetErrorXML(201, "Incorrect parameter: only movie-search supports the imdbid parameter"); - } - if (!string.IsNullOrEmpty(CurrentQuery.SearchTerm)) { - logger.Warn($"A movie-search request from {Request.GetOwinContext().Request.RemoteIpAddress} was made contining q and imdbid."); + logger.Warn($"A search request from {Request.GetOwinContext().Request.RemoteIpAddress} was made contining q and imdbid."); return GetErrorXML(201, "Incorrect parameter: please specify either imdbid or q"); } CurrentQuery.ImdbID = ParseUtil.GetFullImdbID(CurrentQuery.ImdbID); // normalize ImdbID if (CurrentQuery.ImdbID == null) { - logger.Warn($"A movie-search request from {Request.GetOwinContext().Request.RemoteIpAddress} was made with an invalid imdbid."); + logger.Warn($"A search request from {Request.GetOwinContext().Request.RemoteIpAddress} was made with an invalid imdbid."); return GetErrorXML(201, "Incorrect parameter: invalid imdbid format"); } if (!CurrentIndexer.TorznabCaps.SupportsImdbSearch) { - logger.Warn($"A movie-search request with imdbid from {Request.GetOwinContext().Request.RemoteIpAddress} was made but the indexer {CurrentIndexer.DisplayName} doesn't support it."); + logger.Warn($"A search request with imdbid from {Request.GetOwinContext().Request.RemoteIpAddress} was made but the indexer {CurrentIndexer.DisplayName} doesn't support it."); return GetErrorXML(203, "Function Not Available: imdbid is not supported by this indexer"); } }