mirror of https://github.com/Chocobozzz/PeerTube
Fix error log of bad import
parent
51353d9a03
commit
d7ce63d3dd
|
@ -98,12 +98,14 @@ class YoutubeDLWrapper {
|
||||||
})
|
})
|
||||||
|
|
||||||
return Promise.race([ downloadPromise, timeoutPromise ])
|
return Promise.race([ downloadPromise, timeoutPromise ])
|
||||||
.catch(async err => {
|
.catch(err => {
|
||||||
const path = await this.guessVideoPathWithExtension(pathWithoutExtension, fileExt)
|
this.guessVideoPathWithExtension(pathWithoutExtension, fileExt)
|
||||||
|
.then(path => {
|
||||||
|
logger.debug('Error in youtube-dl import, deleting file %s.', path, { err, ...lTags() })
|
||||||
|
|
||||||
logger.debug('Error in youtube-dl import, deleting file %s.', path, { err, ...lTags() })
|
return remove(path)
|
||||||
remove(path)
|
})
|
||||||
.catch(err => logger.error('Cannot remove file in youtubeDL timeout.', { err, ...lTags() }))
|
.catch(innerErr => logger.error('Cannot remove file in youtubeDL timeout.', { innerErr, ...lTags() }))
|
||||||
|
|
||||||
throw err
|
throw err
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue