Add support for movie-search

This commit is contained in:
kaso17
2017-01-16 17:23:19 +01:00
parent 716fe0e6b6
commit af1aa408c9
4 changed files with 45 additions and 2 deletions

View File

@@ -131,10 +131,13 @@ namespace Jackett.Models
if (query["cat"] != null)
{
q.Categories = query["cat"].Split(',').Select(s => int.Parse(s)).ToArray();
q.Categories = query["cat"].Split(',').Where(s => !string.IsNullOrWhiteSpace(s)).Select(s => int.Parse(s)).ToArray();
}else
{
q.Categories = new int[0];
if (q.QueryType == "movie" && string.IsNullOrWhiteSpace(query["imdbid"]))
q.Categories = new int[] { TorznabCatType.Movies.ID };
else
q.Categories = new int[0];
}
if (query["extended"] != null)
@@ -151,6 +154,8 @@ namespace Jackett.Models
q.Offset = ParseUtil.CoerceInt(query["offset"]);
}
q.ImdbID = query["imdbid"];
int rageId;
if (int.TryParse(query["rid"], out rageId))
{