aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-23 11:54:08 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:41 +0100
commit4bc45da342597fb49593fc14c40f8dc5a97bb64e (patch)
tree9fa876e21995b27827fbc4467bd71b8d427312e2 /shared/models/plugins
parentc0ab041c2c749db05ce564d3078c2ad10d18f35f (diff)
downloadPeerTube-4bc45da342597fb49593fc14c40f8dc5a97bb64e.tar.gz
PeerTube-4bc45da342597fb49593fc14c40f8dc5a97bb64e.tar.zst
PeerTube-4bc45da342597fb49593fc14c40f8dc5a97bb64e.zip
Add hooks support for video download
Diffstat (limited to 'shared/models/plugins')
-rw-r--r--shared/models/plugins/client-hook.model.ts6
-rw-r--r--shared/models/plugins/server-hook.model.ts6
2 files changed, 10 insertions, 2 deletions
diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client-hook.model.ts
index 7b7144676..19622e09e 100644
--- a/shared/models/plugins/client-hook.model.ts
+++ b/shared/models/plugins/client-hook.model.ts
@@ -85,8 +85,12 @@ export const clientActionHookObject = {
85 // Fired when the registration page is being initialized 85 // Fired when the registration page is being initialized
86 'action:signup.register.init': true, 86 'action:signup.register.init': true,
87 87
88 // Fired when the modal to download a video/caption is shown
89 'action:modal.video-download.shown': true,
90
88 // ####### Embed hooks ####### 91 // ####### Embed hooks #######
89 // In embed scope, peertube helpers are not available 92 // /!\ In embed scope, peertube helpers are not available
93 // ###########################
90 94
91 // Fired when the embed loaded the player 95 // Fired when the embed loaded the player
92 'action:embed.player.loaded': true 96 'action:embed.player.loaded': true
diff --git a/shared/models/plugins/server-hook.model.ts b/shared/models/plugins/server-hook.model.ts
index 082b4b591..1f7806d0d 100644
--- a/shared/models/plugins/server-hook.model.ts
+++ b/shared/models/plugins/server-hook.model.ts
@@ -50,7 +50,11 @@ export const serverFilterHookObject = {
50 'filter:video.auto-blacklist.result': true, 50 'filter:video.auto-blacklist.result': true,
51 51
52 // Filter result used to check if a user can register on the instance 52 // Filter result used to check if a user can register on the instance
53 'filter:api.user.signup.allowed.result': true 53 'filter:api.user.signup.allowed.result': true,
54
55 // Filter result used to check if video/torrent download is allowed
56 'filter:api.download.video.allowed.result': true,
57 'filter:api.download.torrent.allowed.result': true
54} 58}
55 59
56export type ServerFilterHookName = keyof typeof serverFilterHookObject 60export type ServerFilterHookName = keyof typeof serverFilterHookObject