DigitalHive: automatically re-login

This commit is contained in:
kaso17 2017-01-16 12:29:51 +01:00
parent 5599b05fb3
commit b6accb02dc
1 changed files with 6 additions and 0 deletions

View File

@ -164,6 +164,12 @@ namespace Jackett.Indexers
queryCollection.Add("blah", "0");
var results = await RequestStringWithCookiesAndRetry(searchUrl + "?" + queryCollection.GetQueryString());
if (results.IsRedirect)
{
// re-login
await ApplyConfiguration(null);
results = await RequestStringWithCookiesAndRetry(searchUrl + "?" + queryCollection.GetQueryString());
}
try
{
releases.AddRange(contentToReleaseInfos(results.Content));