From a6449c211d9828993c5460d5adf1f8b1dbfc2724 Mon Sep 17 00:00:00 2001 From: Lawrence curtis Date: Fri, 15 Nov 2024 18:09:47 +0000 Subject: [PATCH] Update sonarr / radar blockscript to make them catch more --- Scripts/Flow/File/File - Blocklist sonarr or radarr.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Scripts/Flow/File/File - Blocklist sonarr or radarr.js b/Scripts/Flow/File/File - Blocklist sonarr or radarr.js index f792417..a699664 100644 --- a/Scripts/Flow/File/File - Blocklist sonarr or radarr.js +++ b/Scripts/Flow/File/File - Blocklist sonarr or radarr.js @@ -2,7 +2,7 @@ * @author Lawrence Curtis * @uid 8eb58ddf-f355-4442-8101-d6fd81a1b927 * @description This script will search the active queue and blocklist and research. For use alongside this strategy https://fileflows.com/docs/guides/sonarr-radarr - * @revision 3 + * @revision 4 * @param {string} URI Radarr/Sonarr root URI and port (e.g. http://radarr:1234) * @param {string} ApiKey API Key * @output Item blocklisted @@ -54,13 +54,14 @@ class Blocklist { check(path) { let queue = this.getJson("queue?pageSize=9999"); + path = path.replace(/\W/gi, '') if(!queue) return 2; let found = false; queue.records.forEach((item) => { - if (path.includes(item.title)) { + if (path.includes(item.title.replace(/\W/gi, ''))) { Logger.ILog(`Removing item ${item.title} from ${item.downloadClient}`); found = true; let endpoint = `queue/${item.id}?blocklist=true`;