diff --git a/src/Jackett/Indexers/TorrentLeech.cs b/src/Jackett/Indexers/TorrentLeech.cs index 732f3af85..92da7c88c 100644 --- a/src/Jackett/Indexers/TorrentLeech.cs +++ b/src/Jackett/Indexers/TorrentLeech.cs @@ -107,13 +107,6 @@ namespace Jackett.Indexers public async Task> PerformQuery(TorznabQuery query) { - var loggedInCheck = await RequestStringWithCookies(SearchUrl); - if (!loggedInCheck.Content.Contains("/user/account/logout")) - { - //Cookie appears to expire after a period of time or logging in to the site via browser - await DoLogin(); - } - var releases = new List(); var searchString = query.GetQueryString(); searchString = searchString.Replace('-', ' '); // remove dashes as they exclude search strings @@ -142,6 +135,14 @@ namespace Jackett.Indexers } var results = await RequestStringWithCookiesAndRetry(searchUrl); + + if (!results.Content.Contains("/user/account/logout")) + { + //Cookie appears to expire after a period of time or logging in to the site via browser + await DoLogin(); + results = await RequestStringWithCookiesAndRetry(searchUrl); + } + try { CQ dom = results.Content;