0.15.0-2 Misc Fixes

This commit is contained in:
michael committed 2026-04-24 10:17:55 +00:00
1 parent 3e5840f329
commit 730bc50715
19 files changed
+1481 -139

No files matched your search

+32 -9
View File
@@ -87,7 +87,16 @@ function isIncompleteOutputPath(outputPath) {
if (!normalized) {
return false;
}
return /(^|\/)incomplete_job-\d+(\/|$)/i.test(normalized);
return /(^|\/)incomplete_job-\d+(\/|$)/i.test(normalized)
|| /(^|\/)incomplete_merge_[^/]+_job_\d+(\/|$)/i.test(normalized);
}
function isIncompleteMergeOutputPath(outputPath) {
const normalized = normalizePathForMatch(outputPath);
if (!normalized) {
return false;
}
return /(^|\/)incomplete_merge_[^/]+_job_\d+(\/|$)/i.test(normalized);
}
function getIncompleteOutputSelectionPaths(outputPath) {
@@ -96,20 +105,28 @@ function getIncompleteOutputSelectionPaths(outputPath) {
return [];
}
const segments = normalized.split('/').filter(Boolean);
const incompleteIndex = segments.findIndex((segment) => /^incomplete_job-\d+$/i.test(segment));
if (incompleteIndex < 0) {
return [];
const incompleteJobIndex = segments.findIndex((segment) => /^incomplete_job-\d+$/i.test(segment));
if (incompleteJobIndex >= 0) {
const folderPath = `/${segments.slice(0, incompleteJobIndex + 1).join('/')}`;
return Array.from(new Set([normalized, folderPath]));
}
const folderPath = `/${segments.slice(0, incompleteIndex + 1).join('/')}`;
return Array.from(new Set([normalized, folderPath]));
const incompleteMergeIndex = segments.findIndex((segment) => /^incomplete_merge_[^/]+_job_\d+$/i.test(segment));
if (incompleteMergeIndex >= 0) {
const mergeFolderPath = `/${segments.slice(0, incompleteMergeIndex + 1).join('/')}`;
const normalizedLooksLikeFolder = incompleteMergeIndex === (segments.length - 1);
return normalizedLooksLikeFolder
? [mergeFolderPath]
: [normalized];
}
return [];
}
function formatPercent(value, digits = 1) {
function formatPercent(value) {
const parsed = Number(value);
if (!Number.isFinite(parsed)) {
return 'n/a';
}
return `${parsed.toFixed(digits)}%`;
return `${Math.trunc(parsed)}%`;
}
function formatTemperature(value) {
@@ -2338,6 +2355,12 @@ export default function RipperPage({
incompleteMovieSelectionPaths = Array.from(new Set(
movieCandidates
.filter((candidate) => Boolean(candidate?.exists) && isIncompleteOutputPath(candidate?.path))
.filter((candidate) => {
if (!isIncompleteMergeOutputPath(candidate?.path)) {
return true;
}
return Boolean(candidate?.isFile);
})
.map((candidate) => String(candidate?.path || '').trim())
.filter(Boolean)
));
@@ -3384,7 +3407,7 @@ export default function RipperPage({
const clampedProgress = Number.isFinite(rawProgress)
? Math.max(0, Math.min(100, rawProgress))
: 0;
const progressLabel = `${Math.round(clampedProgress)}%`;
const progressLabel = `${Math.trunc(clampedProgress)}%`;
const etaLabel = isCancelledState ? '' : String(
hasSeriesBatchProgress
? (runningSeriesChild?.eta || pipelineForJob?.eta || '')