feat: update wget.ts

This commit is contained in:
2025-01-19 13:23:16 +08:00
parent 537e25a40b
commit e5a2977162
2 changed files with 11 additions and 3 deletions

View File

@@ -40,8 +40,8 @@
},
"wget.ts": {
"script_name": "wget.ts",
"script_length": 3567,
"script_sha256": "cb1d30254fd85a9db948f1f2de1d5b966d290677d40917a705e72a0385be97e3",
"script_length": 3789,
"script_sha256": "a5e72e6a86b2aa7a9f9fbe1e89e62100391b86ce11022e10e803c1816ace2f06",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts",
"single_script_file": true
}

View File

@@ -126,4 +126,12 @@ if (contentLength !== null) {
await response.body?.pipeTo(outputFileWritable);
clearInterval(stateFileInterVal);
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)
}`,
);