diff --git a/src/Jackett.Common/Indexers/RarBG.cs b/src/Jackett.Common/Indexers/RarBG.cs index 4a9cdabb3..1ca60ed02 100644 --- a/src/Jackett.Common/Indexers/RarBG.cs +++ b/src/Jackett.Common/Indexers/RarBG.cs @@ -22,7 +22,7 @@ namespace Jackett.Common.Indexers public class RarBG : BaseWebIndexer { // 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 string _appId; private string _token; @@ -69,6 +69,9 @@ namespace Jackett.Common.Indexers 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 { {"last", "created"},