From f61b225095d7c4c88488a0e608145d154191d158 Mon Sep 17 00:00:00 2001 From: controlol <46456214+controlol@users.noreply.github.com> Date: Thu, 6 Feb 2020 23:08:29 +0100 Subject: [PATCH] Update Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio --- Community/Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Community/Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio b/Community/Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio index f9869be..033e5cb 100644 --- a/Community/Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio +++ b/Community/Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio @@ -4,7 +4,7 @@ const fs = require('fs'); function details() { return { id: "Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio", - Name: "Remove non-English audio", + Name: "Keep Preffered Audio", Type: "Audio", Operation:"Remove Audio", Description: "Plugin that checks for unwanted audio, per 1.104 beta you can change the languages yourself from within Tdarr!\nUntill you enter a value it keep english tracks by default.\nUndefined languages are kept to prevent videos without sound.\nIf you would like to keep track of the languages you have for each file you can use the 'special' option.\nCreated by @control#0405", @@ -24,7 +24,7 @@ function details() { } function plugin(file, librarySettings, inputs, otherArguments) { - if (inputs.languages == null) { + if (inputs.languages == "") { var languages = ["eng", "en"]; //these languages should be kept, named according to ISO 639-2 language scheme } else { var languages = inputs.languages.split(','); //these languages should be kept, named according to ISO 639-2 language scheme @@ -37,6 +37,7 @@ function plugin(file, librarySettings, inputs, otherArguments) { } else { var length = special.length; } + console.log(languages); var transcode = 0; //if this becomes '1' it will be transcoded var sourcename = file.meta.FileName.substring(0, file.meta.FileName.lastIndexOf(".")); //filename without extension var specialcheck = ``; //contains the txt string if special language was found