Cardigann: handle unauthorized error code

This commit is contained in:
kaso17 2018-05-17 16:31:24 +02:00
parent c1fb41204c
commit e1c5f3ed6d
1 changed files with 3 additions and 0 deletions

View File

@ -363,6 +363,9 @@ namespace Jackett.Common.Indexers
protected bool checkForError(WebClientStringResult loginResult, IList<errorBlock> errorBlocks)
{
if(loginResult.Status == HttpStatusCode.Unauthorized) // e.g. used by YGGtorrent
throw new ExceptionWithConfigData("401 Unauthorized, check your credentials", configData);
if (errorBlocks == null)
return true; // no error