diff options
Diffstat (limited to 'server/tools/peertube-import-videos.ts')
-rw-r--r-- | server/tools/peertube-import-videos.ts | 16 |
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']) |