From a1eda903a497857017495f37a1fd3593ba7ab23c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 28 May 2021 11:36:33 +0200 Subject: Support '/w/' and '/w/p/' for watch page And use them as default in client --- server/tools/peertube-watch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/tools') diff --git a/server/tools/peertube-watch.ts b/server/tools/peertube-watch.ts index 6d9cfa3b7..3ca3e242a 100644 --- a/server/tools/peertube-watch.ts +++ b/server/tools/peertube-watch.ts @@ -30,7 +30,7 @@ function run (url: string, options: program.OptionValues) { const cmd = 'node ' + join(__dirname, 'node_modules', 'webtorrent-hybrid', 'bin', 'cmd.js') const args = ` --${options.gui} ` + - url.replace('videos/watch', 'download/torrents') + + url.replace(/(\/videos\/watch\/)|\/w\//, '/download/torrents/') + `-${options.resolution}.torrent` try { -- cgit v1.2.3