mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 23:22:46 +00:00
FileList: add auto relogin
This commit is contained in:
parent
7d65e60750
commit
f21a721ddb
1 changed files with 8 additions and 0 deletions
|
@ -122,6 +122,14 @@ namespace Jackett.Indexers
|
||||||
searchUrl += "?" + queryCollection.GetQueryString();
|
searchUrl += "?" + queryCollection.GetQueryString();
|
||||||
|
|
||||||
var response = await RequestStringWithCookiesAndRetry(searchUrl, null, BrowseUrl);
|
var response = await RequestStringWithCookiesAndRetry(searchUrl, null, BrowseUrl);
|
||||||
|
|
||||||
|
// Occasionally the cookies become invalid, login again if that happens
|
||||||
|
if (response.IsRedirect)
|
||||||
|
{
|
||||||
|
await ApplyConfiguration(null);
|
||||||
|
response = await RequestStringWithCookiesAndRetry(searchUrl, null, BrowseUrl);
|
||||||
|
}
|
||||||
|
|
||||||
var results = response.Content;
|
var results = response.Content;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue