aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-14 09:41:20 +0200
committerChocobozzz <me@florianbigard.com>2020-04-14 09:41:20 +0200
commitf940e81469928009e04b72866abba0d5845770d9 (patch)
tree1364c0579160cf945722377818eb24db41f18cea /server
parenta38878191646ee923e8d6c41beb167edffffb781 (diff)
downloadPeerTube-f940e81469928009e04b72866abba0d5845770d9.tar.gz
PeerTube-f940e81469928009e04b72866abba0d5845770d9.tar.zst
PeerTube-f940e81469928009e04b72866abba0d5845770d9.zip
Catch error in import script
Diffstat (limited to 'server')
-rw-r--r--server/tools/peertube-import-videos.ts16
1 files changed, 10 insertions, 6 deletions
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 7f3b58bba..2c9eabe98 100644
--- a/server/tools/peertube-import-videos.ts
+++ b/server/tools/peertube-import-videos.ts
@@ -93,12 +93,16 @@ async function run (url: string, user: UserInfo) {
93 log.info('Will download and upload %d videos.\n', infoArray.length) 93 log.info('Will download and upload %d videos.\n', infoArray.length)
94 94
95 for (const info of infoArray) { 95 for (const info of infoArray) {
96 await processVideo({ 96 try {
97 cwd: program['tmpdir'], 97 await processVideo({
98 url, 98 cwd: program['tmpdir'],
99 user, 99 url,
100 youtubeInfo: info 100 user,
101 }) 101 youtubeInfo: info
102 })
103 } catch (err) {
104 console.error('Cannot process video.', { info, url })
105 }
102 } 106 }
103 107
104 log.info('Video/s for user %s imported: %s', user.username, program['targetUrl']) 108 log.info('Video/s for user %s imported: %s', user.username, program['targetUrl'])