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:
b32b782
)
Replacing the err being thrown by a gracefull exit.process(1)
author
Okhin
<okhin@okhin.fr>
Sat, 24 Mar 2018 19:11:37 +0000
(20:11 +0100)
committer
Rigel Kent
<par@rigelk.eu>
Sat, 24 Mar 2018 20:17:29 +0000
(21:17 +0100)
server/tools/import-videos.ts
patch
|
blob
|
history
diff --git
a/server/tools/import-videos.ts
b/server/tools/import-videos.ts
index 433cee6525e06971ba19a64d28def7afd2cff1f2..72223a01a288d0916da3dacc1378cc3dd6cf6f1d 100644
(file)
--- a/
server/tools/import-videos.ts
+++ b/
server/tools/import-videos.ts
@@
-53,7
+53,10
@@
async function run () {
const options = [ '-j', '--flat-playlist', '--playlist-reverse' ]
youtubeDL.getInfo(program['targetUrl'], options, processOptions, async (err, info) => {
- if (err) throw err
+ if (err) {
+ console.log(err.message);
+ process.exit(1);
+ }
let infoArray: any[]
@@
-157,7
+160,8
@@
async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag
await uploadVideo(program['url'], accessToken, videoAttributes)
} else {
- throw err
+ console.log(err.message);
+ process.exit(1);
}
}