aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-21 15:45:42 +0200
committerChocobozzz <me@florianbigard.com>2021-07-21 15:45:42 +0200
commit5f26f13b3c16ac5ae0a3b0a7142d84a9528cf565 (patch)
tree64021f952b125ae3d152c07180804fd13adfeb48 /support
parent435990290a61ca6fdb679e6b076ef9157b89a6ce (diff)
parent2b9f672b58bc2c13c96ee79f522003979e4bfc02 (diff)
downloadPeerTube-5f26f13b3c16ac5ae0a3b0a7142d84a9528cf565.tar.gz
PeerTube-5f26f13b3c16ac5ae0a3b0a7142d84a9528cf565.tar.zst
PeerTube-5f26f13b3c16ac5ae0a3b0a7142d84a9528cf565.zip
Merge branch 'constant-registry' into develop
Diffstat (limited to 'support')
-rw-r--r--support/doc/plugins/guide.md28
1 files changed, 18 insertions, 10 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index 568c0662f..85aaf9f02 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -234,21 +234,29 @@ function register ({
234 234
235#### Update video constants 235#### Update video constants
236 236
237You can add/delete video categories, licences or languages using the appropriate managers: 237You can add/delete video categories, licences or languages using the appropriate constant managers:
238 238
239```js 239```js
240function register (...) { 240function register ({
241 videoLanguageManager.addLanguage('al_bhed', 'Al Bhed') 241 videoLanguageManager,
242 videoLanguageManager.deleteLanguage('fr') 242 videoCategoryManager,
243 videoLicenceManager,
244 videoPrivacyManager,
245 playlistPrivacyManager
246}) {
247 videoLanguageManager.addConstant('al_bhed', 'Al Bhed')
248 videoLanguageManager.deleteConstant('fr')
243 249
244 videoCategoryManager.addCategory(42, 'Best category') 250 videoCategoryManager.addConstant(42, 'Best category')
245 videoCategoryManager.deleteCategory(1) // Music 251 videoCategoryManager.deleteConstant(1) // Music
252 videoCategoryManager.resetConstants() // Reset to initial categories
253 videoCategoryManager.getConstants() // Retrieve all category constants
246 254
247 videoLicenceManager.addLicence(42, 'Best licence') 255 videoLicenceManager.addConstant(42, 'Best licence')
248 videoLicenceManager.deleteLicence(7) // Public domain 256 videoLicenceManager.deleteConstant(7) // Public domain
249 257
250 videoPrivacyManager.deletePrivacy(2) // Remove Unlisted video privacy 258 videoPrivacyManager.deleteConstant(2) // Remove Unlisted video privacy
251 playlistPrivacyManager.deletePlaylistPrivacy(3) // Remove Private video playlist privacy 259 playlistPrivacyManager.deleteConstant(3) // Remove Private video playlist privacy
252} 260}
253``` 261```
254 262