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) {...@@ -38,7 +38,7 @@ export async function spawn(options: SpawnOptions) {
38 if (!running) return;38 if (!running) return;
39 const { frame, totalFrames, fps, speed } = result;39 const { frame, totalFrames, fps, speed } = result;
40 node.value = frame;40 node.value = frame;
41 node.estimate = totalFrames;41 node.total = totalFrames;
42 const extras = [42 const extras = [
43 `${fps} fps`,43 `${fps} fps`,
44 speed,44 speed,
...@@ -147,7 +147,7 @@ export class Parse {...@@ -147,7 +147,7 @@ export class Parse {
147 const [h, m, s] = match.slice(1).map((x) => Number(x));147 const [h, m, s] = match.slice(1).map((x) => Number(x));
148 this.durationTime = Math.max(148 this.durationTime = Math.max(
149 this.durationTime,149 this.durationTime,
150 h * 60 * 60 + m * 60 + s,150 h! * 60 * 60 + m! * 60 + s!,
151 );151 );
152 }152 }
153 if (!this.targetFps) {153 if (!this.targetFps) {
...@@ -174,8 +174,8 @@ export class Parse {...@@ -174,8 +174,8 @@ export class Parse {
174174
175 const hlsMatch = line.match(/.*Opening '(.+)' for writing/);175 const hlsMatch = line.match(/.*Opening '(.+)' for writing/);
176 if (hlsMatch) {176 if (hlsMatch) {
177 if (!hlsMatch[1].endsWith(".tmp")) {177 if (!hlsMatch[1]!.endsWith(".tmp")) {
178 this.hlsFile = path.basename(hlsMatch[1]);178 this.hlsFile = path.basename(hlsMatch[1]!);
179 }179 }
180 return { kind: "ignore" };180 return { kind: "ignore" };
181 }181 }
src/file-viewer/bin/file-scan.ts+9-9
...@@ -23,9 +23,9 @@ export async function main() {...@@ -23,9 +23,9 @@ export async function main() {
2323
24 const walkQueue = new queue.PriorityQueue(10);24 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 });
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();
270270
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 });
src/file-viewer/rsync.ts+1-1
...@@ -63,7 +63,7 @@ export async function spawn(options: SpawnOptions) {...@@ -63,7 +63,7 @@ export async function spawn(options: SpawnOptions) {
63 speed,63 speed,
64 } = result;64 } = result;
65 node.value = transferNumber;65 node.value = transferNumber;
66 node.estimate = totalFiles;66 node.total = totalFiles;
67 const extras = [67 const extras = [
68 formatSize(bytesTransferred),68 formatSize(bytesTransferred),
69 (totalFiles > filesToCheck)69 (totalFiles > filesToCheck)