| ... | @@ -23,9 +23,9 @@ export async function main() { | ... | @@ -23,9 +23,9 @@ export async function main() { |
| 23 | | 23 | |
| 24 | const walkQueue = new queue.PriorityQueue(10); | 24 | const walkQueue = new queue.PriorityQueue(10); |
| 25 | | 25 | |
| 26 | const dirsNode = progress.start("Walk Tree", { estimate: 1 }); | 26 | const dirsNode = progress.start("Walk Tree", { total: 1 }); |
| 27 | dirsNode.passive = true; | 27 | dirsNode.passive = true; |
| 28 | const fileNode = progress.start("Process File", { estimate: 0 }); | 28 | const fileNode = progress.start("Process File", { total: 0 }); |
| 29 | fileNode.sortChildren = (a, b) => { | 29 | fileNode.sortChildren = (a, b) => { |
| 30 | const ac = a.children.length > 0 ? 1 : 0; | 30 | const ac = a.children.length > 0 ? 1 : 0; |
| 31 | const bc = b.children.length > 0 ? 1 : 0; | 31 | const bc = b.children.length > 0 ? 1 : 0; |
| ... | @@ -251,8 +251,8 @@ export async function main() { | ... | @@ -251,8 +251,8 @@ export async function main() { |
| 251 | if (job.needs === 0) promises.push(queueFileProcessor(job)); | 251 | if (job.needs === 0) promises.push(queueFileProcessor(job)); |
| 252 | } | 252 | } |
| 253 | } | 253 | } |
| 254 | node.estimate = jobs.length; | 254 | node.total = jobs.length; |
| 255 | fileNode.estimate += jobs.length; | 255 | fileNode.total += jobs.length; |
| 256 | for (const job of jobs) { | 256 | for (const job of jobs) { |
| 257 | for (const dependId of job.processor.depends) { | 257 | for (const dependId of job.processor.depends) { |
| 258 | const dependJob = jobs.find((j) => j.processor.id === dependId); | 258 | const dependJob = jobs.find((j) => j.processor.id === dependId); |
| ... | @@ -265,7 +265,7 @@ export async function main() { | ... | @@ -265,7 +265,7 @@ export async function main() { |
| 265 | } | 265 | } |
| 266 | } | 266 | } |
| 267 | } | 267 | } |
| 268 | if (node.estimate > 0) { | 268 | if (node.total > 0) { |
| 269 | errorHandler.move(); | 269 | errorHandler.move(); |
| 270 | | 270 | |
| 271 | const parent = mediaFile.getParent(); | 271 | const parent = mediaFile.getParent(); |
| ... | @@ -669,7 +669,7 @@ const procVideos = transcodeRules.videoFormats.map<Process>((preset) => ({ | ... | @@ -669,7 +669,7 @@ const procVideos = transcodeRules.videoFormats.map<Process>((preset) => ({ |
| 669 | ffmpeg: ffmpegBin!, | 669 | ffmpeg: ffmpegBin!, |
| 670 | progress: node, | 670 | progress: node, |
| 671 | args, | 671 | args, |
| 672 | cwd: dir, | 672 | cwd: dir.toString(), |
| 673 | }); | 673 | }); |
| 674 | }, | 674 | }, |
| 675 | }); | 675 | }); |
| ... | @@ -700,7 +700,7 @@ const procVideoAudios = transcodeRules.audioFormats.map<Process>((preset) => ({ | ... | @@ -700,7 +700,7 @@ const procVideoAudios = transcodeRules.audioFormats.map<Process>((preset) => ({ |
| 700 | ffmpeg: ffmpegBin!, | 700 | ffmpeg: ffmpegBin!, |
| 701 | progress: node, | 701 | progress: node, |
| 702 | args, | 702 | args, |
| 703 | cwd: dir, | 703 | cwd: dir.toString(), |
| 704 | }); | 704 | }); |
| 705 | }, | 705 | }, |
| 706 | }); | 706 | }); |
| ... | @@ -752,7 +752,7 @@ const procDash: Process = { | ... | @@ -752,7 +752,7 @@ const procDash: Process = { |
| 752 | ffmpeg: ffmpegBin!, | 752 | ffmpeg: ffmpegBin!, |
| 753 | progress: node, | 753 | progress: node, |
| 754 | args, | 754 | args, |
| 755 | cwd: dir, | 755 | cwd: dir.toString(), |
| 756 | }); | 756 | }); |
| 757 | }, | 757 | }, |
| 758 | }); | 758 | }); |
| ... | @@ -780,7 +780,7 @@ const procH264Hls: Process = { | ... | @@ -780,7 +780,7 @@ const procH264Hls: Process = { |
| 780 | ffmpeg: ffmpegBin!, | 780 | ffmpeg: ffmpegBin!, |
| 781 | progress: node, | 781 | progress: node, |
| 782 | args, | 782 | args, |
| 783 | cwd: dir, | 783 | cwd: dir.toString(), |
| 784 | }); | 784 | }); |
| 785 | }, | 785 | }, |
| 786 | }); | 786 | }); |