Add request body limit

This commit is contained in:
Chocobozzz
2019-02-21 17:19:16 +01:00
parent 539d3f4faa
commit bfe2ef6bfa
5 changed files with 93 additions and 5 deletions

View File

@@ -116,7 +116,8 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string,
for (const fileUrl of fileUrls) {
const destPath = join(tmpDirectory, basename(fileUrl))
await doRequestAndSaveToFile({ uri: fileUrl }, destPath)
const bodyKBLimit = 10 * 1000 * 1000 // 10GB
await doRequestAndSaveToFile({ uri: fileUrl }, destPath, bodyKBLimit)
}
clearTimeout(timer)