diff options
author | Gérald Niel <gerald.niel@gegeweb.org> | 2018-03-25 15:56:45 +0200 |
---|---|---|
committer | Gérald Niel <gerald.niel@gegeweb.org> | 2018-03-25 15:56:45 +0200 |
commit | 5b107cd341936f30ec1246ed2fb20b3aed04703d (patch) | |
tree | a4045d15991386ddeb5d11e7c449023d31b48cfb /server/tools | |
parent | 5c25dbc22df29c295370f8ac690ba7565368e1c9 (diff) | |
parent | 5c5638a062d90a0f0cd5f6e8ccb3589099668e79 (diff) | |
download | PeerTube-5b107cd341936f30ec1246ed2fb20b3aed04703d.tar.gz PeerTube-5b107cd341936f30ec1246ed2fb20b3aed04703d.tar.zst PeerTube-5b107cd341936f30ec1246ed2fb20b3aed04703d.zip |
Merge branch 'develop' of github.com:Chocobozzz/PeerTube into develop
Diffstat (limited to 'server/tools')
-rw-r--r-- | server/tools/import-videos.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts index 433cee652..baaedd329 100644 --- a/server/tools/import-videos.ts +++ b/server/tools/import-videos.ts | |||
@@ -53,7 +53,10 @@ async function run () { | |||
53 | 53 | ||
54 | const options = [ '-j', '--flat-playlist', '--playlist-reverse' ] | 54 | const options = [ '-j', '--flat-playlist', '--playlist-reverse' ] |
55 | youtubeDL.getInfo(program['targetUrl'], options, processOptions, async (err, info) => { | 55 | youtubeDL.getInfo(program['targetUrl'], options, processOptions, async (err, info) => { |
56 | if (err) throw err | 56 | if (err) { |
57 | console.log(err.message) | ||
58 | process.exit(1) | ||
59 | } | ||
57 | 60 | ||
58 | let infoArray: any[] | 61 | let infoArray: any[] |
59 | 62 | ||
@@ -157,7 +160,8 @@ async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag | |||
157 | 160 | ||
158 | await uploadVideo(program['url'], accessToken, videoAttributes) | 161 | await uploadVideo(program['url'], accessToken, videoAttributes) |
159 | } else { | 162 | } else { |
160 | throw err | 163 | console.log(err.message) |
164 | process.exit(1) | ||
161 | } | 165 | } |
162 | } | 166 | } |
163 | 167 | ||