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)
|
private async Task<WebResult> ReloginIfNecessaryAsync(WebResult response)
|
||||||
{
|
{
|
||||||
if (response.ContentString.Contains("onclick=\"document.location='logout'\"") ||
|
if (response.ContentString.IndexOf("sign in now", StringComparison.InvariantCultureIgnoreCase) == -1)
|
||||||
response.ContentString.Contains("show_id") || response.ContentString.Contains("Filename") ||
|
|
||||||
response.ContentString.Contains("Peers") || response.ContentString.Contains("Download"))
|
|
||||||
return response;
|
return response;
|
||||||
|
|
||||||
logger.Warn("Session expired. Relogin.");
|
logger.Debug("Session expired. Relogin.");
|
||||||
|
|
||||||
await ApplyConfiguration(null);
|
await ApplyConfiguration(null);
|
||||||
response.Request.Cookies = CookieHeader;
|
response.Request.Cookies = CookieHeader;
|
||||||
|
Reference in New Issue
Block a user