mirror of
https://github.com/Jackett/Jackett
synced 2025-01-03 21:57:49 +00:00
TVChaosUK: download relogin
This commit is contained in:
parent
9e7d1cc547
commit
ce15cb8bfe
1 changed files with 13 additions and 1 deletions
|
@ -215,7 +215,7 @@ namespace Jackett.Common.Indexers
|
||||||
var infoMatch = Regex.Match(description, @"Category:\W(?<cat>.*)\W\/\WSeeders:\W(?<seeders>[\d,]*)\W\/\WLeechers:\W(?<leechers>[\d,]*)\W\/\WSize:\W(?<size>[\d\.]*\W\S*)\W\/\WSnatched:\W(?<snatched>[\d,]*) x times");
|
var infoMatch = Regex.Match(description, @"Category:\W(?<cat>.*)\W\/\WSeeders:\W(?<seeders>[\d,]*)\W\/\WLeechers:\W(?<leechers>[\d,]*)\W\/\WSize:\W(?<size>[\d\.]*\W\S*)\W\/\WSnatched:\W(?<snatched>[\d,]*) x times");
|
||||||
if (!infoMatch.Success)
|
if (!infoMatch.Success)
|
||||||
throw new Exception(string.Format("Unable to find info in {0}: ", description));
|
throw new Exception(string.Format("Unable to find info in {0}: ", description));
|
||||||
|
|
||||||
var release = new ReleaseInfo()
|
var release = new ReleaseInfo()
|
||||||
{
|
{
|
||||||
Title = title,
|
Title = title,
|
||||||
|
@ -324,5 +324,17 @@ namespace Jackett.Common.Indexers
|
||||||
|
|
||||||
return releases;
|
return releases;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override async Task<byte[]> Download(Uri link)
|
||||||
|
{
|
||||||
|
var response = await base.Download(link);
|
||||||
|
if (response.Length >= 1 && response[0] == '<') // issue #4395
|
||||||
|
{
|
||||||
|
// relogin
|
||||||
|
await ApplyConfiguration(null);
|
||||||
|
response = await base.Download(link);
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue