projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a388781
)
Catch error in import script
author
Chocobozzz
<me@florianbigard.com>
Tue, 14 Apr 2020 07:41:20 +0000
(09:41 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Tue, 14 Apr 2020 07:41:20 +0000
(09:41 +0200)
server/tools/peertube-import-videos.ts
patch
|
blob
|
history
diff --git
a/server/tools/peertube-import-videos.ts
b/server/tools/peertube-import-videos.ts
index 7f3b58bba7a37d715a3e3add8d4539833b11273f..2c9eabe9889173b4091091c58b02191ee2a5ffa8 100644
(file)
--- 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'])