diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-02 16:05:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-02 16:05:44 +0200 |
commit | ebb9e53ada156249ed8e8cfd1de74097d3eb49d7 (patch) | |
tree | 094873e9f09a30eedf48617d4af3d4a3232df0fb /server/tests/fixtures/peertube-plugin-test | |
parent | 22df69fdecf299c8be6acaa25f086249ea9a0085 (diff) | |
download | PeerTube-ebb9e53ada156249ed8e8cfd1de74097d3eb49d7.tar.gz PeerTube-ebb9e53ada156249ed8e8cfd1de74097d3eb49d7.tar.zst PeerTube-ebb9e53ada156249ed8e8cfd1de74097d3eb49d7.zip |
Add plugin hook on transcoding resolutions building
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test/main.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js index f62f6a435..c395ac7aa 100644 --- a/server/tests/fixtures/peertube-plugin-test/main.js +++ b/server/tests/fixtures/peertube-plugin-test/main.js | |||
@@ -256,8 +256,6 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
256 | registerHook({ | 256 | registerHook({ |
257 | target: 'filter:job-queue.process.params', | 257 | target: 'filter:job-queue.process.params', |
258 | handler: (object, context) => { | 258 | handler: (object, context) => { |
259 | peertubeHelpers.logger.debug('TOTO.', { object, context }) | ||
260 | |||
261 | if (context.type !== 'video-studio-edition') return object | 259 | if (context.type !== 'video-studio-edition') return object |
262 | 260 | ||
263 | object.data.tasks = [ | 261 | object.data.tasks = [ |
@@ -274,6 +272,17 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
274 | } | 272 | } |
275 | }) | 273 | }) |
276 | 274 | ||
275 | registerHook({ | ||
276 | target: 'filter:transcoding.auto.lower-resolutions-to-transcode.result', | ||
277 | handler: (object, context) => { | ||
278 | if (context.video.name.includes('transcode-filter')) { | ||
279 | object = [ 100 ] | ||
280 | } | ||
281 | |||
282 | return object | ||
283 | } | ||
284 | }) | ||
285 | |||
277 | // Upload/import/live attributes | 286 | // Upload/import/live attributes |
278 | for (const target of [ | 287 | for (const target of [ |
279 | 'filter:api.video.upload.video-attribute.result', | 288 | 'filter:api.video.upload.video-attribute.result', |