From a2dd698acd18a9052dc10f8bd158fac11797d355 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Thu, 9 Dec 2021 07:34:59 +0000 Subject: [PATCH] Fix lint --- Community/Tdarr_Plugin_x7ac_Remove_Closed_Captions.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Community/Tdarr_Plugin_x7ac_Remove_Closed_Captions.js b/Community/Tdarr_Plugin_x7ac_Remove_Closed_Captions.js index 45ad864..8918a4e 100644 --- a/Community/Tdarr_Plugin_x7ac_Remove_Closed_Captions.js +++ b/Community/Tdarr_Plugin_x7ac_Remove_Closed_Captions.js @@ -17,6 +17,7 @@ function details() { function plugin(file) { const response = { processFile: false, + // eslint-disable-next-line no-useless-escape preset: ',-map 0 -codec copy -bsf:v \"filter_units=remove_types=6\"', container: `.${file.container}`, handBrakeMode: false, @@ -35,14 +36,14 @@ function plugin(file) { return response; } // If not, check for Closed Captions in the streams - const {streams} = file.ffProbeData; - for (const stream in streams) { + const { streams } = file.ffProbeData; + streams.forEach((stream) => { if (stream.closed_captions) { response.processFile = true; - break; } - } - response.infoLog += response.processFile ? '☒This file has burnt closed captions \n' + }); + + response.infoLog += response.processFile ? '☒This file has burnt closed captions \n' : '☑Closed captions have not been detected on this file \n'; return response; }