aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/youtube-dl.ts')
-rw-r--r--server/helpers/youtube-dl.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts
index 9e8ef90d8..74e5f896c 100644
--- a/server/helpers/youtube-dl.ts
+++ b/server/helpers/youtube-dl.ts
@@ -170,7 +170,12 @@ async function updateYoutubeDLBinary () {
170 return res() 170 return res()
171 } 171 }
172 172
173 downloadFile.pipe(createWriteStream(bin, { mode: 493 })) 173 const writeStream = createWriteStream(bin, { mode: 493 }).on('error', err => {
174 logger.error('youtube-dl update error in write stream', { err })
175 return res()
176 })
177
178 downloadFile.pipe(writeStream)
174 }) 179 })
175 180
176 downloadFile.on('error', err => { 181 downloadFile.on('error', err => {