Skip to content

Commit

Permalink
Merge pull request #19 from Feramance/Shared-Scripts-update
Browse files Browse the repository at this point in the history
Constructor update
  • Loading branch information
revenz authored May 29, 2024
2 parents 51e799a + 1ff1308 commit e47e102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Scripts/Shared/Radarr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
6 changes: 3 additions & 3 deletions Scripts/Shared/Sonarr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit e47e102

Please sign in to comment.