mirror of
https://github.com/Tusko/vimeo-private-downloader.git
synced 2025-03-12 05:35:24 -07:00
feat: Better error handling on segment download side
This commit is contained in:
parent
9987b838b6
commit
b8fe708f77
4
index.js
4
index.js
@ -122,6 +122,10 @@ function combineSegments(type, i, segmentsUrl, output, filename, downloadingFlag
|
||||
|
||||
let req = https
|
||||
.get(segmentsUrl[i], res => {
|
||||
if (res.statusCode != 200) {
|
||||
cb(new Error(`Downloading segment with url '${segmentsUrl[i]}' failed with status: ${res.statusCode} ${res.statusMessage}`))
|
||||
}
|
||||
|
||||
res.on("data", d => output.write(d));
|
||||
|
||||
res.on("end", () =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user