mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
shazbat: simplify conditions for relogin check (#13993)
This commit is contained in:
@@ -269,12 +269,10 @@ namespace Jackett.Common.Indexers
|
||||
|
||||
private async Task<WebResult> ReloginIfNecessaryAsync(WebResult response)
|
||||
{
|
||||
if (response.ContentString.Contains("onclick=\"document.location='logout'\"") ||
|
||||
response.ContentString.Contains("show_id") || response.ContentString.Contains("Filename") ||
|
||||
response.ContentString.Contains("Peers") || response.ContentString.Contains("Download"))
|
||||
if (response.ContentString.IndexOf("sign in now", StringComparison.InvariantCultureIgnoreCase) == -1)
|
||||
return response;
|
||||
|
||||
logger.Warn("Session expired. Relogin.");
|
||||
logger.Debug("Session expired. Relogin.");
|
||||
|
||||
await ApplyConfiguration(null);
|
||||
response.Request.Cookies = CookieHeader;
|
||||
|
Reference in New Issue
Block a user