mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Update Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio
This commit is contained in:
parent
0778411653
commit
f61b225095
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue