diff --git a/extras/video-link-downloader/video-link-downloader.js b/extras/video-link-downloader/video-link-downloader.js index c2e930ec1..33499462c 100644 --- a/extras/video-link-downloader/video-link-downloader.js +++ b/extras/video-link-downloader/video-link-downloader.js @@ -106,15 +106,17 @@ class Downloader { const promises = []; while (startByte < fragment.size) { const partFilename = `${title}.part${part}`; - if (fs.existsSync(partFilename)) { - this.progressMap.set(partFilename, partialLength); - this.updateProgress(); - } - else { - const endByte = Math.min(fragment.size - 1, Math.round(startByte + partialLength)); - const range = `bytes=${startByte}-${endByte}`; - promises.push(this.downloadFragmentPart(fragment.url, range, partFilename)); - } + // if (fs.existsSync(partFilename)) + // { + // this.progressMap.set(partFilename, partialLength); + // this.updateProgress(); + // } + // else + // { + const endByte = Math.min(fragment.size - 1, Math.round(startByte + partialLength)); + const range = `bytes=${startByte}-${endByte}`; + promises.push(this.downloadFragmentPart(fragment.url, range, partFilename)); + // } startByte = Math.round(startByte + partialLength) + 1; part++; } diff --git a/extras/video-link-downloader/video-link-downloader.ts b/extras/video-link-downloader/video-link-downloader.ts index f6e7edb59..8b687aeba 100644 --- a/extras/video-link-downloader/video-link-downloader.ts +++ b/extras/video-link-downloader/video-link-downloader.ts @@ -152,17 +152,17 @@ class Downloader while (startByte < fragment.size) { const partFilename = `${title}.part${part}`; - if (fs.existsSync(partFilename)) - { - this.progressMap.set(partFilename, partialLength); - this.updateProgress(); - } - else - { - const endByte = Math.min(fragment.size - 1, Math.round(startByte + partialLength)); - const range = `bytes=${startByte}-${endByte}`; - promises.push(this.downloadFragmentPart(fragment.url, range, partFilename)); - } + // if (fs.existsSync(partFilename)) + // { + // this.progressMap.set(partFilename, partialLength); + // this.updateProgress(); + // } + // else + // { + const endByte = Math.min(fragment.size - 1, Math.round(startByte + partialLength)); + const range = `bytes=${startByte}-${endByte}`; + promises.push(this.downloadFragmentPart(fragment.url, range, partFilename)); + // } startByte = Math.round(startByte + partialLength) + 1; part++; }