From 0cb9e75a53727d52cc5f3e44796cb6e7a5699403 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Thu, 30 Nov 2023 05:58:24 +0000 Subject: [PATCH 1/2] Clarify switch input type --- .../audio/checkAudioCodec/1.0.0/index.ts | 6 +----- .../1.0.0/index.ts | 12 ++---------- .../ffmpegCommandSetContainer/1.0.0/index.ts | 6 +----- .../1.0.0/index.ts | 18 +++--------------- .../file/copyMoveFolderContent/1.0.0/index.ts | 12 ++---------- .../file/copyToDirectory/1.0.0/index.ts | 12 ++---------- .../file/moveToDirectory/2.0.0/index.ts | 6 +----- .../handbrakeCustomArguments/2.0.0/index.ts | 6 +----- .../input/inputFile/1.0.0/index.ts | 12 ++---------- .../FlowHelpers/1.0.0/interfaces/interfaces.ts | 3 ++- 10 files changed, 17 insertions(+), 76 deletions(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.ts index 354161b4a..812db93d3 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.ts @@ -49,11 +49,7 @@ const details = ():IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Toggle whether to check the bitrate of the audio codec is within a range.', diff --git a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts index 83b7acc99..5fd0ef964 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.ts @@ -77,11 +77,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Toggle whether to enable setting audio bitrate', @@ -118,11 +114,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Toggle whether to enable setting audio samplerate', diff --git a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.ts index 13057297a..2ed84f985 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.ts @@ -41,11 +41,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: ` Specify if you want to force conform the file to the new container, diff --git a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.ts index 7ac5f1fe9..920ece68c 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.ts @@ -75,11 +75,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to use hardware encoding if available', }, @@ -106,11 +102,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to use hardware decoding if available', }, @@ -120,11 +112,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to force encoding if stream already has the target codec', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts index 5463d7b63..673af0407 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.ts @@ -70,11 +70,7 @@ Useful if, for example, you want to move things like subtitle files or cover art type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to keep the relative path', }, @@ -84,11 +80,7 @@ Useful if, for example, you want to move things like subtitle files or cover art type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to copy/move all files in the directory (excluding the original and working file)', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.ts index c04d61e53..6d198602b 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.ts @@ -38,11 +38,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to keep the relative path', }, @@ -52,11 +48,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Make the copied file the working file', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.ts index 3e6a032b4..75b2d6483 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.ts @@ -40,11 +40,7 @@ const details = ():IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to keep the relative path', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.ts index 1ca9ee627..6ac4355c4 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.ts @@ -27,11 +27,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to use a JSON preset or not', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/input/inputFile/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/input/inputFile/1.0.0/index.ts index cba91e7bf..0dc18a081 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/input/inputFile/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/input/inputFile/1.0.0/index.ts @@ -27,11 +27,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Will check if input file and cache are readable and writable', }, @@ -41,11 +37,7 @@ const details = (): IpluginDetails => ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'This will pause the node if the file access checks fail', }, diff --git a/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts b/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts index d9f2c0aa5..a1d5b0827 100644 --- a/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts +++ b/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts @@ -2,7 +2,8 @@ import { IFileObject, Istreams } from './synced/IFileObject'; import Ijob from './synced/jobInterface'; export interface IpluginInputUi { - type: 'dropdown' | 'text' | 'textarea' | 'directory' | 'slider', + // boolean inputs will default to a switch + type: 'dropdown' | 'text' | 'textarea' | 'directory' | 'slider' | 'switch', options?: string[], sliderOptions?: {max: number, min: number, } style?: Record, From 1d62880df3c9de54a49f5d25f9e6369d3e134394 Mon Sep 17 00:00:00 2001 From: HaveAGitGat Date: Thu, 30 Nov 2023 06:00:32 +0000 Subject: [PATCH 2/2] Apply auto-build changes --- .../audio/checkAudioCodec/1.0.0/index.js | 6 +----- .../1.0.0/index.js | 12 ++---------- .../ffmpegCommandSetContainer/1.0.0/index.js | 6 +----- .../1.0.0/index.js | 18 +++--------------- .../file/copyMoveFolderContent/1.0.0/index.js | 12 ++---------- .../file/copyToDirectory/1.0.0/index.js | 12 ++---------- .../file/moveToDirectory/2.0.0/index.js | 6 +----- .../handbrakeCustomArguments/2.0.0/index.js | 6 +----- .../input/inputFile/1.0.0/index.js | 12 ++---------- 9 files changed, 15 insertions(+), 75 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.js index caa1ea656..7e44bf93e 100644 --- a/FlowPlugins/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/audio/checkAudioCodec/1.0.0/index.js @@ -46,11 +46,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Toggle whether to check the bitrate of the audio codec is within a range.', }, diff --git a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js index 7273bf1a6..34fd669e9 100644 --- a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandEnsureAudioStream/1.0.0/index.js @@ -70,11 +70,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Toggle whether to enable setting audio bitrate', }, @@ -109,11 +105,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Toggle whether to enable setting audio samplerate', }, diff --git a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.js index 74133562d..49d916522 100644 --- a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetContainer/1.0.0/index.js @@ -37,11 +37,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: "\nSpecify if you want to force conform the file to the new container,\nThis is useful if not all streams are supported by the new container. \nFor example mkv does not support data streams.\n ", }, diff --git a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.js index 9c9f231aa..61427d065 100644 --- a/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/ffmpegCommand/ffmpegCommandSetVideoEncoder/1.0.0/index.js @@ -107,11 +107,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to use hardware encoding if available', }, @@ -138,11 +134,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to use hardware decoding if available', }, @@ -152,11 +144,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to force encoding if stream already has the target codec', }, diff --git a/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js index 64593dc2c..e734badd2 100644 --- a/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/file/copyMoveFolderContent/1.0.0/index.js @@ -102,11 +102,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'true', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to keep the relative path', }, @@ -116,11 +112,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to copy/move all files in the directory (excluding the original and working file)', }, diff --git a/FlowPlugins/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.js index 28369bfea..0e103fe0f 100644 --- a/FlowPlugins/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/file/copyToDirectory/1.0.0/index.js @@ -73,11 +73,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to keep the relative path', }, @@ -87,11 +83,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Make the copied file the working file', }, diff --git a/FlowPlugins/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.js index a34a5ebc2..04c491b29 100644 --- a/FlowPlugins/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/file/moveToDirectory/2.0.0/index.js @@ -73,11 +73,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to keep the relative path', }, diff --git a/FlowPlugins/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.js index 052e1f15f..acdc8acd7 100644 --- a/FlowPlugins/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/handbrake/handbrakeCustomArguments/2.0.0/index.js @@ -60,11 +60,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Specify whether to use a JSON preset or not', }, diff --git a/FlowPlugins/CommunityFlowPlugins/input/inputFile/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/input/inputFile/1.0.0/index.js index bd6853089..1ba6026f4 100644 --- a/FlowPlugins/CommunityFlowPlugins/input/inputFile/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/input/inputFile/1.0.0/index.js @@ -59,11 +59,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'Will check if input file and cache are readable and writable', }, @@ -73,11 +69,7 @@ var details = function () { return ({ type: 'boolean', defaultValue: 'false', inputUI: { - type: 'dropdown', - options: [ - 'false', - 'true', - ], + type: 'switch', }, tooltip: 'This will pause the node if the file access checks fail', },