Verified Commit f940e814 authored by Chocobozzz's avatar Chocobozzz
Browse files

Catch error in import script

parent a3887819
......@@ -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'])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment