From 6ad732cd877d5e6d588e4c2d101af7dcfec73fd9 Mon Sep 17 00:00:00 2001 From: kaso17 Date: Wed, 14 Mar 2018 17:59:17 +0100 Subject: [PATCH] PassThePopcorn: avoid relogins --- src/Jackett.Common/Indexers/PassThePopcorn.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Jackett.Common/Indexers/PassThePopcorn.cs b/src/Jackett.Common/Indexers/PassThePopcorn.cs index ed5639d2f..f98739a7a 100644 --- a/src/Jackett.Common/Indexers/PassThePopcorn.cs +++ b/src/Jackett.Common/Indexers/PassThePopcorn.cs @@ -94,8 +94,6 @@ namespace Jackett.Common.Indexers protected override async Task> PerformQuery(TorznabQuery query) { - await DoLogin(); - var releases = new List(); bool configGoldenPopcornOnly = configData.FilterString.Value.ToLowerInvariant().Contains("goldenpopcorn"); bool configSceneOnly = configData.FilterString.Value.ToLowerInvariant().Contains("scene"); @@ -116,6 +114,12 @@ namespace Jackett.Common.Indexers } var results = await RequestStringWithCookiesAndRetry(movieListSearchUrl); + if (results.IsRedirect) // untested + { + // re-login + await DoLogin(); + results = await RequestStringWithCookiesAndRetry(movieListSearchUrl); + } try { //Iterate over the releases for each movie