From 5595f3ad127dfb6c5f0fc4a5cd33bd380da0e5ed Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Mon, 20 May 2024 09:53:53 +0100 Subject: [PATCH 1/6] Remove default --- .../CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.ts index 02b3787..e701086 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', }, From 1e5d6b8014f4ce9448a7c7348ce24bb33a91b5ab Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Mon, 20 May 2024 09:54:42 +0100 Subject: [PATCH 2/6] Update tooltip --- .../file/copyMoveFolderContent/1.0.0/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts index 673af04..3d2ed09 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', From a94a8006b317523690a1812954ecbd333ad4610d Mon Sep 17 00:00:00 2001 From: HaveAGitGat Date: Mon, 20 May 2024 08:55:56 +0000 Subject: [PATCH 3/6] Apply auto-build changes --- .../CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/checkFlowVariable/1.0.0/index.js index 5854242..e5b0bdc 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', }, From 0b11e8ad757ca4368e9808e08fa5ae6b600bec47 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Mon, 20 May 2024 10:04:07 +0100 Subject: [PATCH 4/6] Check mediaInfo properties --- ...ion_remove_stream_by_specified_property.js | 5 +++- ...ion_remove_stream_by_specified_property.js | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) 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 4c80689..8e1732c 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 @@ -76,7 +76,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/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 1457d04..b397f1c 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); From 96ea729a5220c0f3cb99a2f433b65a1b1bee7d1c Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Mon, 20 May 2024 10:05:55 +0100 Subject: [PATCH 5/6] Update description --- ...arr_Plugin_00td_action_remove_stream_by_specified_property.js | 1 + 1 file changed, 1 insertion(+) 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 8e1732c..c4e1a24 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', From 91187aed9fd54dd427bf3ba44f549583e220f136 Mon Sep 17 00:00:00 2001 From: HaveAGitGat Date: Mon, 20 May 2024 09:07:53 +0000 Subject: [PATCH 6/6] Apply auto-build changes --- .../file/copyMoveFolderContent/1.0.0/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js index 4ac05b3..bc7e6ce 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',