mirror of https://github.com/Jackett/Jackett
Torznab: use GetFullImdbID()
This commit is contained in:
parent
91a619e0f6
commit
a0dae306c1
|
@ -98,13 +98,12 @@ namespace Jackett.Controllers
|
|||
return GetErrorXML(201, "Incorrect parameter: please specify either imdbid or q");
|
||||
}
|
||||
|
||||
var imdbid = ParseUtil.GetImdbID(torznabQuery.ImdbID);
|
||||
if (imdbid == null)
|
||||
torznabQuery.ImdbID = ParseUtil.GetFullImdbID(torznabQuery.ImdbID); // normalize ImdbID
|
||||
if (torznabQuery.ImdbID == null)
|
||||
{
|
||||
logger.Warn(string.Format("A movie-search request from {0} was made with an invalid imdbid.", Request.GetOwinContext().Request.RemoteIpAddress));
|
||||
return GetErrorXML(201, "Incorrect parameter: invalid imdbid format");
|
||||
}
|
||||
torznabQuery.ImdbID = "tt" + ((int)imdbid).ToString("D7");
|
||||
|
||||
if (!indexer.TorznabCaps.SupportsImdbSearch)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue