mirror of https://github.com/Jackett/Jackett
* rarbg: user configurable api url * Update RarBG.cs * change position * tidy up
This commit is contained in:
parent
8427feaa2d
commit
65c022dcd0
|
@ -22,7 +22,7 @@ namespace Jackett.Common.Indexers
|
||||||
public class RarBG : BaseWebIndexer
|
public class RarBG : BaseWebIndexer
|
||||||
{
|
{
|
||||||
// API doc: https://torrentapi.org/apidocs_v2.txt?app_id=Jackett
|
// API doc: https://torrentapi.org/apidocs_v2.txt?app_id=Jackett
|
||||||
private const string ApiEndpoint = "https://torrentapi.org/pubapi_v2.php";
|
private string ApiEndpoint => ((StringConfigurationItem)configData.GetDynamic("apiEndpoint")).Value;
|
||||||
private readonly TimeSpan TokenDuration = TimeSpan.FromMinutes(14); // 15 minutes expiration
|
private readonly TimeSpan TokenDuration = TimeSpan.FromMinutes(14); // 15 minutes expiration
|
||||||
private readonly string _appId;
|
private readonly string _appId;
|
||||||
private string _token;
|
private string _token;
|
||||||
|
@ -69,6 +69,9 @@ namespace Jackett.Common.Indexers
|
||||||
|
|
||||||
webclient.requestDelay = 2.5; // The api has a 1req/2s limit
|
webclient.requestDelay = 2.5; // The api has a 1req/2s limit
|
||||||
|
|
||||||
|
var ConfigApiEndpoint = new StringConfigurationItem("API URL") { Value = "https://torrentapi.org/pubapi_v2.php" };
|
||||||
|
configData.AddDynamic("apiEndpoint", ConfigApiEndpoint);
|
||||||
|
|
||||||
var sort = new SingleSelectConfigurationItem("Sort requested from site", new Dictionary<string, string>
|
var sort = new SingleSelectConfigurationItem("Sort requested from site", new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{"last", "created"},
|
{"last", "created"},
|
||||||
|
|
Loading…
Reference in New Issue