diff --git a/Scripts/Shared/Radarr.js b/Scripts/Shared/Radarr.js index 4c36a3e..6fc2025 100644 --- a/Scripts/Shared/Radarr.js +++ b/Scripts/Shared/Radarr.js @@ -9,12 +9,12 @@ export class Radarr URL; ApiKey; - constructor() + constructor(URL, ApiKey) { - this.URL = Variables['Radarr.Url']; + this.URL = ((URL) ? URL : Variables['Radarr.Url']); if (!this.URL) MissingVariable('Radarr.Url'); - this.ApiKey = Variables['Radarr.ApiKey']; + this.ApiKey = ((ApiKey) ? ApiKey : Variables['Radarr.ApiKey']); if (!this.ApiKey) MissingVariable('Radarr.ApiKey'); } diff --git a/Scripts/Shared/Sonarr.js b/Scripts/Shared/Sonarr.js index e1d582a..051ed34 100644 --- a/Scripts/Shared/Sonarr.js +++ b/Scripts/Shared/Sonarr.js @@ -9,12 +9,12 @@ export class Sonarr URL; ApiKey; - constructor() + constructor(URL, ApiKey) { - this.URL = Variables['Sonarr.Url']; + this.URL = ((URL) ? URL : Variables['Sonarr.Url']); if (!this.URL) MissingVariable('Sonarr.Url'); - this.ApiKey = Variables['Sonarr.ApiKey']; + this.ApiKey = ((ApiKey) ? ApiKey : Variables['Sonarr.ApiKey']); if (!this.ApiKey) MissingVariable('Sonarr.ApiKey'); }