mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-07 18:45:09 +00:00
Increase download timeout limit
This commit is contained in:
@@ -48,6 +48,7 @@
|
|||||||
"sanitize-filename": "^1.6.3",
|
"sanitize-filename": "^1.6.3",
|
||||||
"scan-chart": "^3.4.1",
|
"scan-chart": "^3.4.1",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
|
"undici": "^6.3.0",
|
||||||
"zod": "^3.22.4",
|
"zod": "^3.22.4",
|
||||||
"zone.js": "~0.14.2"
|
"zone.js": "~0.14.2"
|
||||||
},
|
},
|
||||||
|
|||||||
11
pnpm-lock.yaml
generated
11
pnpm-lock.yaml
generated
@@ -74,6 +74,9 @@ dependencies:
|
|||||||
tslib:
|
tslib:
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.6.2
|
version: 2.6.2
|
||||||
|
undici:
|
||||||
|
specifier: ^6.3.0
|
||||||
|
version: 6.3.0
|
||||||
zod:
|
zod:
|
||||||
specifier: ^3.22.4
|
specifier: ^3.22.4
|
||||||
version: 3.22.4
|
version: 3.22.4
|
||||||
@@ -2410,7 +2413,6 @@ packages:
|
|||||||
/@fastify/busboy@2.1.0:
|
/@fastify/busboy@2.1.0:
|
||||||
resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
|
resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@humanwhocodes/config-array@0.11.13:
|
/@humanwhocodes/config-array@0.11.13:
|
||||||
resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==}
|
resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==}
|
||||||
@@ -10299,6 +10301,13 @@ packages:
|
|||||||
'@fastify/busboy': 2.1.0
|
'@fastify/busboy': 2.1.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/undici@6.3.0:
|
||||||
|
resolution: {integrity: sha512-zkSMOXs2topAR1LF0PxAaNNvhdX4LYEcmRMJLMh3mjgfZpBtc/souXOp4aYiR5Q46HrBPA2/8DkEZhD3eNFE1Q==}
|
||||||
|
engines: {node: '>=18.0'}
|
||||||
|
dependencies:
|
||||||
|
'@fastify/busboy': 2.1.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
/unicode-canonical-property-names-ecmascript@2.0.0:
|
/unicode-canonical-property-names-ecmascript@2.0.0:
|
||||||
resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==}
|
resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
|
|||||||
@@ -10,12 +10,15 @@ import { join } from 'path'
|
|||||||
import { rimraf } from 'rimraf'
|
import { rimraf } from 'rimraf'
|
||||||
import { Readable } from 'stream'
|
import { Readable } from 'stream'
|
||||||
import { ReadableStream } from 'stream/web'
|
import { ReadableStream } from 'stream/web'
|
||||||
|
import { Agent, fetch, setGlobalDispatcher } from 'undici'
|
||||||
import { inspect } from 'util'
|
import { inspect } from 'util'
|
||||||
|
|
||||||
import { tempPath } from '../../../src-shared/Paths'
|
import { tempPath } from '../../../src-shared/Paths'
|
||||||
import { sanitizeFilename } from '../../ElectronUtilFunctions'
|
import { sanitizeFilename } from '../../ElectronUtilFunctions'
|
||||||
import { getSettings } from '../SettingsHandler.ipc'
|
import { getSettings } from '../SettingsHandler.ipc'
|
||||||
|
|
||||||
|
setGlobalDispatcher(new Agent({ connect: { timeout: 60_000 } }))
|
||||||
|
|
||||||
export interface DownloadMessage {
|
export interface DownloadMessage {
|
||||||
header: string
|
header: string
|
||||||
body: string
|
body: string
|
||||||
@@ -167,7 +170,8 @@ export class ChartDownload {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const sngStream = new SngStream(() => sngResponse.body!, { generateSongIni: true })
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const sngStream = new SngStream(() => sngResponse.body! as any, { generateSongIni: true })
|
||||||
let downloadedByteCount = BigInt(0)
|
let downloadedByteCount = BigInt(0)
|
||||||
|
|
||||||
await mkdirp(join(this.tempPath, this.destinationName))
|
await mkdirp(join(this.tempPath, this.destinationName))
|
||||||
|
|||||||
Reference in New Issue
Block a user