From fc9be544336abfca3271891ed4df6010ded4404a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 30 Apr 2020 09:06:39 +0200 Subject: [PATCH] Add support for watch settings in hello world --- peertube-plugin-hello-world/main.js | 7 ++++++- peertube-plugin-hello-world/package.json | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/peertube-plugin-hello-world/main.js b/peertube-plugin-hello-world/main.js index 8f08f8d..8eefa96 100644 --- a/peertube-plugin-hello-world/main.js +++ b/peertube-plugin-hello-world/main.js @@ -7,7 +7,8 @@ async function register ({ videoCategoryManager, videoLicenceManager, videoLanguageManager, - registerExternalAuth + registerExternalAuth, + peertubeHelpers }) { const defaultAdmin = 'PeerTube admin' @@ -74,6 +75,10 @@ async function register ({ videoLicenceManager.addLicence(42, 'Best licence') videoLicenceManager.deleteLicence(7) // Public domain + settingsManager.onSettingsChange(settings => { + peertubeHelpers.logger.info('Settings changed!', { settings }) + }) + const router = getRouter() router.get('/ping', (req, res) => res.json({ message: 'pong' })) diff --git a/peertube-plugin-hello-world/package.json b/peertube-plugin-hello-world/package.json index d3e20d2..e356a51 100644 --- a/peertube-plugin-hello-world/package.json +++ b/peertube-plugin-hello-world/package.json @@ -1,9 +1,9 @@ { "name": "peertube-plugin-hello-world", - "version": "0.0.16", + "version": "0.0.17", "description": "Hello world PeerTube plugin example", "engine": { - "peertube": ">=1.3.0" + "peertube": ">=2.2.0" }, "keywords": [ "peertube",