feat: update wget.ts
This commit is contained in:
@@ -40,8 +40,8 @@
|
|||||||
},
|
},
|
||||||
"wget.ts": {
|
"wget.ts": {
|
||||||
"script_name": "wget.ts",
|
"script_name": "wget.ts",
|
||||||
"script_length": 3567,
|
"script_length": 3789,
|
||||||
"script_sha256": "cb1d30254fd85a9db948f1f2de1d5b966d290677d40917a705e72a0385be97e3",
|
"script_sha256": "a5e72e6a86b2aa7a9f9fbe1e89e62100391b86ce11022e10e803c1816ace2f06",
|
||||||
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts",
|
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts",
|
||||||
"single_script_file": true
|
"single_script_file": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,4 +126,12 @@ if (contentLength !== null) {
|
|||||||
await response.body?.pipeTo(outputFileWritable);
|
await response.body?.pipeTo(outputFileWritable);
|
||||||
clearInterval(stateFileInterVal);
|
clearInterval(stateFileInterVal);
|
||||||
await clearLastLine();
|
await clearLastLine();
|
||||||
console.log("Download finished.");
|
|
||||||
|
const costTime = new Date().getTime() - startTime;
|
||||||
|
const fileInfo = await Deno.stat(outputFilename);
|
||||||
|
const fileSize = fileInfo.size;
|
||||||
|
console.log(
|
||||||
|
`Download finished, size: ${formatSize2(fileSize)}, time: ${
|
||||||
|
formatHumanTime(costTime)
|
||||||
|
}`,
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user