Create error on zero-byte poster (#352)
* Error on zero-byte poster * return cb to stop execution
This commit is contained in:
parent
457aca25ee
commit
da1e120de9
1 changed files with 2 additions and 0 deletions
|
|
@ -64,6 +64,8 @@ function torrentPosterFromVideo (file, torrent, cb) {
|
|||
|
||||
server.destroy()
|
||||
|
||||
if (buf.length === 0) return cb(new Error('Generated poster contains no data'))
|
||||
|
||||
cb(null, buf, '.jpg')
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue