diff --git a/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js b/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js index 4c8068990..c4e1a242e 100644 --- a/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js +++ b/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js @@ -6,6 +6,7 @@ const details = () => ({ Operation: 'Transcode', Description: ` This plugin removes streams based on the specified property. + Checks FFprobe 'streams' and MediaInfo 'track' properties. `, Version: '1.00', Tags: 'action', @@ -76,7 +77,10 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { let streamToRemove = false; for (let i = 0; i < file.ffProbeData.streams.length; i += 1) { try { - if (valuesToRemove.includes(String(file.ffProbeData.streams[i][propertyToCheck]))) { + if ( + valuesToRemove.includes(String(file.ffProbeData.streams[i][propertyToCheck])) + || valuesToRemove.includes(String(file.mediaInfo.track[i + 1][propertyToCheck])) + ) { response.preset += ` -map -0:${i} `; response.infoLog += ` Removing stream ${i} which is has ${propertyToCheck}` + ` of ${file.ffProbeData.streams[i][propertyToCheck]} \n`; diff --git a/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js index 4ac05b361..bc7e6ced7 100644 --- a/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js @@ -114,7 +114,7 @@ var details = function () { return ({ inputUI: { type: 'switch', }, - tooltip: 'Specify whether to copy/move all files in the directory (excluding the original and working file)', + tooltip: "Specify whether to copy/move all files in the directory (excluding the original and working file)\n or use the input below to specify file extensions", }, { label: 'File Extensions', diff --git a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js index 5854242cf..e5b0bdc65 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js @@ -19,7 +19,7 @@ var details = function () { return ({ label: 'Variable', name: 'variable', type: 'string', - defaultValue: '{{{args.librarySettings._id}}}', + defaultValue: '', inputUI: { type: 'text', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts index 673af0407..3d2ed097e 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts @@ -82,7 +82,8 @@ Useful if, for example, you want to move things like subtitle files or cover art inputUI: { type: 'switch', }, - tooltip: 'Specify whether to copy/move all files in the directory (excluding the original and working file)', + tooltip: `Specify whether to copy/move all files in the directory (excluding the original and working file) + or use the input below to specify file extensions`, }, { label: 'File Extensions', diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts index 02b37877e..e7010863c 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts @@ -22,7 +22,7 @@ const details = (): IpluginDetails => ({ label: 'Variable', name: 'variable', type: 'string', - defaultValue: '{{{args.librarySettings._id}}}', + defaultValue: '', inputUI: { type: 'text', }, diff --git a/tests/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js b/tests/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js index 1457d044d..b397f1c64 100644 --- a/tests/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js +++ b/tests/Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js @@ -217,6 +217,30 @@ const tests = [ + ' Files has streams which need to be removed, processing \n', }, }, + + { + input: { + file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')), + librarySettings: {}, + inputs: { + propertyToCheck: 'CodecID', + valuesToRemove: 'A_AAC-2,S_TEXT/UTF8', + }, + otherArguments: {}, + }, + output: { + processFile: true, + preset: ', -map 0 -c copy -max_muxing_queue_size 9999 -map -0:4 -map -0:5 -map -0:6 ', + container: '.mkv', + handBrakeMode: false, + FFmpegMode: true, + reQueueAfter: false, + infoLog: ' Removing stream 4 which is has CodecID of undefined \n' + + ' Removing stream 5 which is has CodecID of undefined \n' + + ' Removing stream 6 which is has CodecID of undefined \n' + + ' Files has streams which need to be removed, processing \n', + }, + }, ]; void run(tests);