mirror of
https://github.com/Tusko/vimeo-private-downloader.git
synced 2025-08-21 13:54:24 -07:00
undo file identation changes
This commit is contained in:
parent
266a44bbd8
commit
85db8c5885
1 changed files with 73 additions and 72 deletions
|
@ -107,7 +107,7 @@ log(
|
||||||
`Downloading ${type} segment ${i}/${segmentsUrl.length} of ${filename}`
|
`Downloading ${type} segment ${i}/${segmentsUrl.length} of ${filename}`
|
||||||
);
|
);
|
||||||
|
|
||||||
let req = https
|
https
|
||||||
.get(segmentsUrl[i], res => {
|
.get(segmentsUrl[i], res => {
|
||||||
res.on("data", d => output.write(d));
|
res.on("data", d => output.write(d));
|
||||||
|
|
||||||
|
@ -118,16 +118,12 @@ let req = https
|
||||||
.on("error", e => {
|
.on("error", e => {
|
||||||
cb(e);
|
cb(e);
|
||||||
});
|
});
|
||||||
req.setTimeout(7000, function () {
|
|
||||||
console.log("Timeout. Retrying");
|
|
||||||
combineSegments(type, i, segmentsUrl, output, filename, downloadingFlag, cb)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJson(url, cb) {
|
function getJson(url, cb) {
|
||||||
let data = "";
|
let data = "";
|
||||||
|
|
||||||
https
|
let req = https
|
||||||
.get(url, res => {
|
.get(url, res => {
|
||||||
res.on("data", d => (data += d));
|
res.on("data", d => (data += d));
|
||||||
|
|
||||||
|
@ -136,6 +132,11 @@ function getJson(url, cb) {
|
||||||
.on("error", e => {
|
.on("error", e => {
|
||||||
cb(e);
|
cb(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
req.setTimeout(7000, function () {
|
||||||
|
console.log("Timeout. Retrying");
|
||||||
|
combineSegments(type, i, segmentsUrl, output, filename, downloadingFlag, cb)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function initJs(n = 0) {
|
function initJs(n = 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue