aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-import-videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-30 10:44:50 +0100
committerChocobozzz <me@florianbigard.com>2019-12-30 10:44:50 +0100
commit4449d2695bad78ac149ef5615f50286dcbe06f04 (patch)
tree7b18046a733f6ad16b672b45033277568be0d019 /server/tools/peertube-import-videos.ts
parent1f3a605e10a6e5fc820f9287a382a11d6dca41b4 (diff)
downloadPeerTube-4449d2695bad78ac149ef5615f50286dcbe06f04.tar.gz
PeerTube-4449d2695bad78ac149ef5615f50286dcbe06f04.tar.zst
PeerTube-4449d2695bad78ac149ef5615f50286dcbe06f04.zip
Fix URL normalization in import script
Diffstat (limited to 'server/tools/peertube-import-videos.ts')
-rw-r--r--server/tools/peertube-import-videos.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 39e8221c0..eaa792763 100644
--- a/server/tools/peertube-import-videos.ts
+++ b/server/tools/peertube-import-videos.ts
@@ -333,7 +333,7 @@ function isNSFW (info: any) {
333function normalizeTargetUrl (url: string) { 333function normalizeTargetUrl (url: string) {
334 let normalizedUrl = url.replace(/\/+$/, '') 334 let normalizedUrl = url.replace(/\/+$/, '')
335 335
336 if (!normalizedUrl.startsWith('http://') || !normalizedUrl.startsWith('https://')) { 336 if (!normalizedUrl.startsWith('http://') && !normalizedUrl.startsWith('https://')) {
337 normalizedUrl = 'https://' + normalizedUrl 337 normalizedUrl = 'https://' + normalizedUrl
338 } 338 }
339 339