Skip to content

Commit

Permalink
修复视频下载完成合并失败的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HeiSir2014 committed Mar 25, 2021
1 parent e516067 commit 5411f6a
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1,295 deletions.
3 changes: 1 addition & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,6 @@ async function startDownload(object,iidx) {
let filpath = path.join(dir, `${ ((iSeg + 1) +'').padStart(6,'0') }.ts`);
if(fs.existsSync(filpath))
{
indexData += `file '${filpath}'\r\n`;
fileSegments.push(filpath);
}
}
Expand Down Expand Up @@ -1061,7 +1060,7 @@ async function startDownload(object,iidx) {

for (let i = 0; i < fileSegments.length; i++) {
let percent = Number.parseInt((i+1)*100/fileSegments.length);
video.status = `已完成,合并中[${percent}%]`;
video.status = `合并中[${percent}%]`;
mainWindow.webContents.send('task-notify-end',video);
let filePath = fileSegments[i];
fs.existsSync(filePath) && ffmpegInputStream.push(fs.readFileSync(filePath));
Expand Down
Loading

0 comments on commit 5411f6a

Please sign in to comment.