aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-10 13:49:19 +0100
committerChocobozzz <me@florianbigard.com>2021-12-10 13:51:44 +0100
commitd17d743051c5716e1e08cd8870d718cfd6a57f0c (patch)
tree2f8c8d1a08467f35c5ede18001fc18cb2bafafef /server/tests/fixtures/peertube-plugin-test
parent8cf43a6524d354fbfa0f0eaf789e8d4756bd25d6 (diff)
downloadPeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.tar.gz
PeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.tar.zst
PeerTube-d17d743051c5716e1e08cd8870d718cfd6a57f0c.zip
Add upload/import/go live video attributes hooks
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
index aba415d1e..04e059848 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -240,6 +240,21 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
240 } 240 }
241 }) 241 })
242 242
243 // Upload/import/live attributes
244 for (const target of [
245 'filter:api.video.upload.video-attribute.result',
246 'filter:api.video.import-url.video-attribute.result',
247 'filter:api.video.import-torrent.video-attribute.result',
248 'filter:api.video.live.video-attribute.result'
249 ]) {
250 registerHook({
251 target,
252 handler: (result) => {
253 return { ...result, description: result.description + ' - ' + target }
254 }
255 })
256 }
257
243 { 258 {
244 const filterHooks = [ 259 const filterHooks = [
245 'filter:api.search.videos.local.list.params', 260 'filter:api.search.videos.local.list.params',