aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-import-videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/peertube-import-videos.ts')
-rw-r--r--server/tools/peertube-import-videos.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 39184f46d..3c41a6c0c 100644
--- a/server/tools/peertube-import-videos.ts
+++ b/server/tools/peertube-import-videos.ts
@@ -57,8 +57,8 @@ getServerCredentials(command)
57 exitError('--tmpdir %s: directory does not exist or is not accessible', program[ 'tmpdir' ]) 57 exitError('--tmpdir %s: directory does not exist or is not accessible', program[ 'tmpdir' ])
58 } 58 }
59 59
60 removeEndSlashes(url) 60 url = removeEndSlashes(url)
61 removeEndSlashes(program[ 'targetUrl' ]) 61 program[ 'targetUrl' ] = removeEndSlashes(program[ 'targetUrl' ])
62 62
63 const user = { username, password } 63 const user = { username, password }
64 64
@@ -330,9 +330,7 @@ function isNSFW (info: any) {
330} 330}
331 331
332function removeEndSlashes (url: string) { 332function removeEndSlashes (url: string) {
333 while (url.endsWith('/')) { 333 return url.replace(/\/+$/, '')
334 url.slice(0, -1)
335 }
336} 334}
337 335
338async function promptPassword () { 336async function promptPassword () {