House of Torrents: reset cookies on login

This commit is contained in:
kaso17 2016-12-14 08:45:40 +01:00
parent 059701fbf6
commit f921df948c
1 changed files with 5 additions and 0 deletions

View File

@ -100,6 +100,11 @@ namespace Jackett.Indexers
{ {
configData.LoadValuesFromJson(configJson); configData.LoadValuesFromJson(configJson);
// reset cookies, if we send expired cookies for a new session their code seems to get confused
// Due to the session not getting initiated correctly it will result in errors like this:
// Notice: Undefined index: simpleCaptchaAnswer in /var/www/html/takelogin.php on line 17
CookieHeader = null;
var result1 = await RequestStringWithCookies(CaptchaUrl); var result1 = await RequestStringWithCookies(CaptchaUrl);
var json1 = JObject.Parse(result1.Content); var json1 = JObject.Parse(result1.Content);
var captchaSelection = json1["images"][0]["hash"]; var captchaSelection = json1["images"][0]["hash"];