Skip to content

Commit

Permalink
Merge pull request #63 from BuSHari/fix/radarr_sonarr_lookup
Browse files Browse the repository at this point in the history
Fix/radarr sonarr lookup
  • Loading branch information
revenz authored Sep 28, 2024
2 parents 04f006c + dddc8ee commit 99d2c5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Scripts/Flow/Applications/Radarr/Radarr - Movie Lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import { Radarr } from 'Shared/Radarr';
* @description This script looks up a Movie from Radarr and retrieves its metadata
* @author Idan Bush
* @uid 1153e3fb-e7bb-4162-87ad-5c15cd9c081f
* @revision 1
* @revision 2
* @param {string} URL Radarr root URL and port (e.g., http://radarr:1234)
* @param {string} ApiKey API Key for Radarr
* @param {bool} UseFolderName Whether to use the folder name instead of the file name for search
* @output Movie found
* @output Movie not found
*/
function Script(URL, ApiKey) {
let URL = ((URL) ? URL : Variables['Radarr.Url']);
let ApiKey = ((ApiKey) ? ApiKey : Variables['Radarr.ApiKey']);
URL = URL || Variables['Radarr.Url'];
ApiKey = ApiKey || Variables['Radarr.ApiKey'];
const radarr = new Radarr(URL, ApiKey);
const folderPath = Variables.folder.Orig.FullName;
const filePath = Variables.file.Orig.FullName;
Expand Down
6 changes: 3 additions & 3 deletions Scripts/Flow/Applications/Sonarr/Sonarr - TV Show Lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import { Sonarr } from 'Shared/Sonarr';
* @description This script looks up a TV Show from Sonarr and retrieves its metadata
* @author Idan Bush
* @uid 9f25c573-1c3c-4a1e-8429-5f1fc69fc6d8
* @revision 1
* @revision 2
* @param {string} URL Sonarr root URL and port (e.g., http://sonarr:1234)
* @param {string} ApiKey API Key for Sonarr
* @param {bool} UseFolderName Whether to use the folder name instead of the file name for the search pattern.<br>If the folder starts with "Season", "Staffel", "Saison", or "Specials", the parent folder will be used.
* @output TV Show found
* @output TV Show NOT found
*/
function Script(URL, ApiKey) {
let URL = ((URL) ? URL : Variables['Sonarr.Url']);
let ApiKey = ((ApiKey) ? ApiKey : Variables['Sonarr.ApiKey']);
URL = URL || Variables['Sonarr.Url'];
ApiKey = ApiKey || Variables['Sonarr.ApiKey'];
const sonarr = new Sonarr(URL, ApiKey);
const folderPath = Variables.folder.Orig.FullName;
const filePath = Variables.file.Orig.FullName;
Expand Down

0 comments on commit 99d2c5f

Please sign in to comment.