mirror of https://github.com/Jackett/Jackett
Added retry logic to morethantv
This commit is contained in:
parent
f2749ed311
commit
c9df7bc47a
|
@ -2,6 +2,7 @@
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
@ -49,6 +50,7 @@ namespace Jackett.Indexers
|
||||||
HttpClient client;
|
HttpClient client;
|
||||||
|
|
||||||
string cookieHeader;
|
string cookieHeader;
|
||||||
|
int retries = 3;
|
||||||
|
|
||||||
public MoreThanTV()
|
public MoreThanTV()
|
||||||
{
|
{
|
||||||
|
@ -129,7 +131,7 @@ namespace Jackett.Indexers
|
||||||
IsConfigured = true;
|
IsConfigured = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FillReleaseInfoFromJson(ReleaseInfo release, JObject r)
|
static void FillReleaseInfoFromJson(ReleaseInfo release, JObject r)
|
||||||
{
|
{
|
||||||
var id = r["torrentId"];
|
var id = r["torrentId"];
|
||||||
release.Size = (long)r["size"];
|
release.Size = (long)r["size"];
|
||||||
|
@ -153,7 +155,7 @@ namespace Jackett.Indexers
|
||||||
string results;
|
string results;
|
||||||
if (Program.IsWindows)
|
if (Program.IsWindows)
|
||||||
{
|
{
|
||||||
results = await client.GetStringAsync(episodeSearchUrl);
|
results = await client.GetStringAsync(episodeSearchUrl, retries);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -227,6 +229,5 @@ namespace Jackett.Indexers
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue