From cee7ceb1f662bd0f853ace857e69e78c938926d1 Mon Sep 17 00:00:00 2001 From: Diego Heras Date: Sat, 8 Feb 2020 07:11:11 +0100 Subject: [PATCH] iptorrents: show bad cookie error. resolves #5164 (#7137) --- src/Jackett.Common/Indexers/IPTorrents.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Indexers/IPTorrents.cs b/src/Jackett.Common/Indexers/IPTorrents.cs index fdad44913..47e80da60 100644 --- a/src/Jackett.Common/Indexers/IPTorrents.cs +++ b/src/Jackett.Common/Indexers/IPTorrents.cs @@ -240,9 +240,11 @@ namespace Jackett.Common.Indexers searchUrl += "?" + queryCollection.GetQueryString(); var response = await RequestStringWithCookiesAndRetry(searchUrl, null, BrowseUrl); - var results = response.Content; + if (results == null || !results.Contains("/lout.php")) + throw new Exception("The user is not logged in. It is possible that the cookie has expired or you made a mistake when copying it. Please check the settings."); + if (string.IsNullOrWhiteSpace(query.ImdbID) && string.IsNullOrWhiteSpace(query.SearchTerm) && results.Contains("No Torrents Found!")) throw new Exception("Got No Torrents Found! Make sure your IPTorrents profile config contain proper default category settings.");