Torznab: use GetFullImdbID()

This commit is contained in:
kaso17 2017-01-25 10:56:56 +01:00
parent 91a619e0f6
commit a0dae306c1
1 changed files with 2 additions and 3 deletions

View File

@ -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)
{