feat:最终成品
This commit is contained in:
@@ -29,7 +29,7 @@ export async function fastdownload(data:[string,string]){
|
||||
})
|
||||
const totalBar = multibar.create(data.length, 0, {filename: '总文件数'})
|
||||
return await pMap(data,async(e)=>{
|
||||
const size:number = await (async()=>{const head = (await got.head(e[0])).headers['content-length'];if(head){return Number(head)}else{return 0}})()
|
||||
const size:number = await (async()=>{const head = (await got.head(e[0].replace("https://mod.mcimirror.top","https://edge.forgecdn.net"))).headers['content-length'];if(head){return Number(head)}else{return 0}})()
|
||||
const bar = multibar.create(size, 0, {filename: e[1]})
|
||||
try{
|
||||
await pRetry(async()=>{
|
||||
@@ -124,7 +124,7 @@ export async function xfastdownload(
|
||||
}
|
||||
|
||||
export const usemirror = (()=>{
|
||||
env.config()
|
||||
env.config({debug:false})
|
||||
const mirror = process.env.MIRROR
|
||||
if(mirror){
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user