From 350727db5bf7d5d61fc0977e2b1eb32b4a70ced1 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Thu, 9 May 2024 07:35:43 +0100 Subject: [PATCH 1/3] CPU and GPU Workers with Classic Plugins --- .../video/cpuGpuWorkersWithClassicPlugins.ts | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 FlowPluginsTs/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.ts diff --git a/FlowPluginsTs/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.ts b/FlowPluginsTs/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.ts new file mode 100644 index 000000000..43806277f --- /dev/null +++ b/FlowPluginsTs/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.ts @@ -0,0 +1,151 @@ +/* eslint-disable no-template-curly-in-string */ +/* eslint-disable import/prefer-default-export */ + +import { IflowTemplate } from '../../FlowHelpers/1.0.0/interfaces/interfaces'; + +const details = () :IflowTemplate => ({ + name: 'CPU and GPU Workers with Classic Plugins', + description: 'An example of how to use CPU and GPU workers in a flow with Classic plugins.', + tags: '', + flowPlugins: [ + { + name: 'Input File', + sourceRepo: 'Community', + pluginName: 'inputFile', + version: '1.0.0', + id: '7a6heYJTK', + position: { + x: 619.59375, + y: 71, + }, + }, + { + name: 'Check Flow Variable Worker Type', + sourceRepo: 'Community', + pluginName: 'checkFlowVariable', + version: '1.0.0', + inputsDB: { + variable: '{{{args.workerType}}}', + value: 'transcodecpu', + }, + id: 'Xmz-M1Kcp', + position: { + x: 283.20237348477906, + y: 290.238450972502, + }, + }, + { + name: 'Run Classic Transcode Plugin GPU', + sourceRepo: 'Community', + pluginName: 'runClassicTranscodePlugin', + version: '1.0.0', + id: 'eqw2BDcZn', + position: { + x: 375.31709058623835, + y: 408.0111681805965, + }, + }, + { + name: 'Run Classic Transcode Plugin CPU', + sourceRepo: 'Community', + pluginName: 'runClassicTranscodePlugin', + version: '1.0.0', + inputsDB: { + pluginSourceId: 'Community:Tdarr_Plugin_MC93_Migz1FFMPEG_CPU', + }, + id: 'UINSF-Jto', + position: { + x: 100.25684007589598, + y: 404.37175331560564, + }, + }, + { + name: 'Replace Original File', + sourceRepo: 'Community', + pluginName: 'replaceOriginalFile', + version: '1.0.0', + id: 'lxwMPh0uu', + position: { + x: 595.7808723912251, + y: 607.9004301072788, + }, + }, + { + name: 'Check Video Codec', + sourceRepo: 'Community', + pluginName: 'checkVideoCodec', + version: '1.0.0', + id: 'proNYXeri', + position: { + x: 619.8706093195298, + y: 156.082632021403, + }, + }, + { + name: 'Check if the worker is CPU or GPU', + sourceRepo: 'Community', + pluginName: 'comment', + version: '1.0.0', + id: 'AKPe0A7V8', + position: { + x: 464.26942235255467, + y: 287.4437630300136, + }, + }, + ], + flowEdges: [ + { + source: 'Xmz-M1Kcp', + sourceHandle: '1', + target: 'UINSF-Jto', + targetHandle: null, + id: 'uidvJfV-Y', + }, + { + source: 'Xmz-M1Kcp', + sourceHandle: '2', + target: 'eqw2BDcZn', + targetHandle: null, + id: 'NJYk1xAp8', + }, + { + source: 'proNYXeri', + sourceHandle: '2', + target: 'Xmz-M1Kcp', + targetHandle: null, + id: 'SLQVwGIPH', + }, + { + source: '7a6heYJTK', + sourceHandle: '1', + target: 'proNYXeri', + targetHandle: null, + id: 'qiz1H28mJ', + }, + { + source: 'proNYXeri', + sourceHandle: '1', + target: 'lxwMPh0uu', + targetHandle: null, + id: 'AqBdvBcmk', + }, + { + source: 'UINSF-Jto', + sourceHandle: '1', + target: 'lxwMPh0uu', + targetHandle: null, + id: 'iwEuBiRZF', + }, + { + source: 'eqw2BDcZn', + sourceHandle: '1', + target: 'lxwMPh0uu', + targetHandle: null, + id: 'WQDC5fqqR', + }, + ], +}); + +export { + details, +}; From fcb165eb597bc8c52645bb730cbf4d1b62f3dff3 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Thu, 9 May 2024 07:41:06 +0100 Subject: [PATCH 2/3] Update fork check --- .github/workflows/lint_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index 293202d0a..f7fa63dcf 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -60,7 +60,8 @@ jobs: - run: npm i && npm i -g typescript && rm -rdf ./FlowPlugins && tsc -v && tsc - uses: stefanzweifel/git-auto-commit-action@v5 - if: ${{ github.event.pull_request.head.repo.full_name == 'org/repo' }} + ## fix this check + if: github.event.pull_request.head.repo.full_name == github.repository with: commit_message: Apply auto-build changes From d4c42935175acca210b917a56ceddfd4a6449e76 Mon Sep 17 00:00:00 2001 From: HaveAGitGat Date: Thu, 9 May 2024 06:43:07 +0000 Subject: [PATCH 3/3] Apply auto-build changes --- .../video/cpuGpuWorkersWithClassicPlugins.js | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 FlowPlugins/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.js diff --git a/FlowPlugins/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.js b/FlowPlugins/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.js new file mode 100644 index 000000000..60d37e568 --- /dev/null +++ b/FlowPlugins/CommunityFlowTemplates/video/cpuGpuWorkersWithClassicPlugins.js @@ -0,0 +1,148 @@ +"use strict"; +/* eslint-disable no-template-curly-in-string */ +/* eslint-disable import/prefer-default-export */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.details = void 0; +var details = function () { return ({ + name: 'CPU and GPU Workers with Classic Plugins', + description: 'An example of how to use CPU and GPU workers in a flow with Classic plugins.', + tags: '', + flowPlugins: [ + { + name: 'Input File', + sourceRepo: 'Community', + pluginName: 'inputFile', + version: '1.0.0', + id: '7a6heYJTK', + position: { + x: 619.59375, + y: 71, + }, + }, + { + name: 'Check Flow Variable Worker Type', + sourceRepo: 'Community', + pluginName: 'checkFlowVariable', + version: '1.0.0', + inputsDB: { + variable: '{{{args.workerType}}}', + value: 'transcodecpu', + }, + id: 'Xmz-M1Kcp', + position: { + x: 283.20237348477906, + y: 290.238450972502, + }, + }, + { + name: 'Run Classic Transcode Plugin GPU', + sourceRepo: 'Community', + pluginName: 'runClassicTranscodePlugin', + version: '1.0.0', + id: 'eqw2BDcZn', + position: { + x: 375.31709058623835, + y: 408.0111681805965, + }, + }, + { + name: 'Run Classic Transcode Plugin CPU', + sourceRepo: 'Community', + pluginName: 'runClassicTranscodePlugin', + version: '1.0.0', + inputsDB: { + pluginSourceId: 'Community:Tdarr_Plugin_MC93_Migz1FFMPEG_CPU', + }, + id: 'UINSF-Jto', + position: { + x: 100.25684007589598, + y: 404.37175331560564, + }, + }, + { + name: 'Replace Original File', + sourceRepo: 'Community', + pluginName: 'replaceOriginalFile', + version: '1.0.0', + id: 'lxwMPh0uu', + position: { + x: 595.7808723912251, + y: 607.9004301072788, + }, + }, + { + name: 'Check Video Codec', + sourceRepo: 'Community', + pluginName: 'checkVideoCodec', + version: '1.0.0', + id: 'proNYXeri', + position: { + x: 619.8706093195298, + y: 156.082632021403, + }, + }, + { + name: 'Check if the worker is CPU or GPU', + sourceRepo: 'Community', + pluginName: 'comment', + version: '1.0.0', + id: 'AKPe0A7V8', + position: { + x: 464.26942235255467, + y: 287.4437630300136, + }, + }, + ], + flowEdges: [ + { + source: 'Xmz-M1Kcp', + sourceHandle: '1', + target: 'UINSF-Jto', + targetHandle: null, + id: 'uidvJfV-Y', + }, + { + source: 'Xmz-M1Kcp', + sourceHandle: '2', + target: 'eqw2BDcZn', + targetHandle: null, + id: 'NJYk1xAp8', + }, + { + source: 'proNYXeri', + sourceHandle: '2', + target: 'Xmz-M1Kcp', + targetHandle: null, + id: 'SLQVwGIPH', + }, + { + source: '7a6heYJTK', + sourceHandle: '1', + target: 'proNYXeri', + targetHandle: null, + id: 'qiz1H28mJ', + }, + { + source: 'proNYXeri', + sourceHandle: '1', + target: 'lxwMPh0uu', + targetHandle: null, + id: 'AqBdvBcmk', + }, + { + source: 'UINSF-Jto', + sourceHandle: '1', + target: 'lxwMPh0uu', + targetHandle: null, + id: 'iwEuBiRZF', + }, + { + source: 'eqw2BDcZn', + sourceHandle: '1', + target: 'lxwMPh0uu', + targetHandle: null, + id: 'WQDC5fqqR', + }, + ], +}); }; +exports.details = details;