fix: don't limit range end

This commit is contained in:
LuanRT
2021-11-04 08:01:03 -03:00
parent 309942090d
commit 5dd6ef9e24

View File

@@ -405,8 +405,7 @@ class Innertube extends EventEmitter {
response.data.pipe(stream, { end: true });
} else {
const chunk_size = 1048576 * 10; // 10MB
options.range && (options.range.end > chunk_size && (options.range.end = chunk_size));
let chunk_start = (options.range && options.range.start || 0);
let chunk_end = (options.range && options.range.end || chunk_size);
let downloaded_size = 0;