Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Catch error in import script

Chocobozzzf940e8146992
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts
index 7f3b58bba7..2c9eabe988 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) {
log.info('Will download and upload %d videos.\n', infoArray.length)
for (const info of infoArray) {
- await processVideo({
- cwd: program['tmpdir'],
- url,
- user,
- youtubeInfo: info
- })
+ try {
+ await processVideo({
+ cwd: program['tmpdir'],
+ url,
+ user,
+ youtubeInfo: info
+ })
+ } catch (err) {
+ console.error('Cannot process video.', { info, url })
+ }
}
log.info('Video/s for user %s imported: %s', user.username, program['targetUrl'])