authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-10-15 23:36:01-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-01-14 01:08:17-08:00
log82917100494eb8ac5a92d06fbc0dddadac986cef
treede72e37311374e89a2716a5da10154c074da4329
parent19dfe1d5ef6b974107997e7e6f106df965a96410
signature Commit is signed but in an unrecognized format.

chore: migrate progress breaking changes


3 files changed, 14 insertions(+), 14 deletions(-)

lib/subprocess/ffmpeg.ts+4-4
......@@ -38,7 +38,7 @@ export async function spawn(options: SpawnOptions) {
3838 if (!running) return;
3939 const { frame, totalFrames, fps, speed } = result;
4040 node.value = frame;
41 node.estimate = totalFrames;
41 node.total = totalFrames;
4242 const extras = [
4343 `${fps} fps`,
4444 speed,
......@@ -147,7 +147,7 @@ export class Parse {
147147 const [h, m, s] = match.slice(1).map((x) => Number(x));
148148 this.durationTime = Math.max(
149149 this.durationTime,
150 h * 60 * 60 + m * 60 + s,
150 h! * 60 * 60 + m! * 60 + s!,
151151 );
152152 }
153153 if (!this.targetFps) {
......@@ -174,8 +174,8 @@ export class Parse {
174174
175175 const hlsMatch = line.match(/.*Opening '(.+)' for writing/);
176176 if (hlsMatch) {
177 if (!hlsMatch[1].endsWith(".tmp")) {
178 this.hlsFile = path.basename(hlsMatch[1]);
177 if (!hlsMatch[1]!.endsWith(".tmp")) {
178 this.hlsFile = path.basename(hlsMatch[1]!);
179179 }
180180 return { kind: "ignore" };
181181 }
src/file-viewer/bin/file-scan.ts+9-9
......@@ -23,9 +23,9 @@ export async function main() {
2323
2424 const walkQueue = new queue.PriorityQueue(10);
2525
26 const dirsNode = progress.start("Walk Tree", { estimate: 1 });
26 const dirsNode = progress.start("Walk Tree", { total: 1 });
2727 dirsNode.passive = true;
28 const fileNode = progress.start("Process File", { estimate: 0 });
28 const fileNode = progress.start("Process File", { total: 0 });
2929 fileNode.sortChildren = (a, b) => {
3030 const ac = a.children.length > 0 ? 1 : 0;
3131 const bc = b.children.length > 0 ? 1 : 0;
......@@ -251,8 +251,8 @@ export async function main() {
251251 if (job.needs === 0) promises.push(queueFileProcessor(job));
252252 }
253253 }
254 node.estimate = jobs.length;
255 fileNode.estimate += jobs.length;
254 node.total = jobs.length;
255 fileNode.total += jobs.length;
256256 for (const job of jobs) {
257257 for (const dependId of job.processor.depends) {
258258 const dependJob = jobs.find((j) => j.processor.id === dependId);
......@@ -265,7 +265,7 @@ export async function main() {
265265 }
266266 }
267267 }
268 if (node.estimate > 0) {
268 if (node.total > 0) {
269269 errorHandler.move();
270270
271271 const parent = mediaFile.getParent();
......@@ -669,7 +669,7 @@ const procVideos = transcodeRules.videoFormats.map<Process>((preset) => ({
669669 ffmpeg: ffmpegBin!,
670670 progress: node,
671671 args,
672 cwd: dir,
672 cwd: dir.toString(),
673673 });
674674 },
675675 });
......@@ -700,7 +700,7 @@ const procVideoAudios = transcodeRules.audioFormats.map<Process>((preset) => ({
700700 ffmpeg: ffmpegBin!,
701701 progress: node,
702702 args,
703 cwd: dir,
703 cwd: dir.toString(),
704704 });
705705 },
706706 });
......@@ -752,7 +752,7 @@ const procDash: Process = {
752752 ffmpeg: ffmpegBin!,
753753 progress: node,
754754 args,
755 cwd: dir,
755 cwd: dir.toString(),
756756 });
757757 },
758758 });
......@@ -780,7 +780,7 @@ const procH264Hls: Process = {
780780 ffmpeg: ffmpegBin!,
781781 progress: node,
782782 args,
783 cwd: dir,
783 cwd: dir.toString(),
784784 });
785785 },
786786 });
src/file-viewer/rsync.ts+1-1
......@@ -63,7 +63,7 @@ export async function spawn(options: SpawnOptions) {
6363 speed,
6464 } = result;
6565 node.value = transferNumber;
66 node.estimate = totalFiles;
66 node.total = totalFiles;
6767 const extras = [
6868 formatSize(bytesTransferred),
6969 (totalFiles > filesToCheck)