PirateBay querying & parsing working

This commit is contained in:
zone117x
2015-04-16 00:04:28 -06:00
parent de111c4202
commit 0608d4ee17
12 changed files with 220 additions and 40 deletions

View File

@@ -21,6 +21,7 @@ namespace Jackett
public static TorznabQuery FromHttpQuery(NameValueCollection query)
{
//{t=tvsearch&cat=5030%2c5040&extended=1&apikey=test&offset=0&limit=100&rid=24493&season=5&ep=1}
var q = new TorznabQuery();
q.QueryType = query["t"];
@@ -29,9 +30,15 @@ namespace Jackett
q.ApiKey = query["apikey"];
q.Limit = int.Parse(query["limit"]);
q.Offset = int.Parse(query["offset"]);
q.RageID = int.Parse(query["rid"]);
q.Season = int.Parse(query["season"]);
q.Episode = int.Parse(query["ep"]);
int temp;
if (int.TryParse(query["rid"], out temp))
q.RageID = temp;
if (int.TryParse(query["season"], out temp))
q.Season = temp;
if (int.TryParse(query["ep"], out temp))
q.Episode = int.Parse(query["ep"]);
return q;
}
}