Skip to content

Commit

Permalink
Fixed issue in Radarr when variables not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
BuSHari authored Sep 28, 2024
1 parent 87fe910 commit dddc8ee
Showing 1 changed file with 3 additions and 3 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

0 comments on commit dddc8ee

Please sign in to comment.