0.15.0-1 ---
This commit is contained in:
1 parent
120a9e6ad1
commit
3e5840f329
7 files changed
+886
-255
No files matched your search
@@ -603,6 +603,11 @@ function extractMultipartMergeSources(job) {
|
||||
return ordered;
|
||||
}
|
||||
|
||||
function shouldDeleteMultipartMergeInputsAfterSuccess(job) {
|
||||
const encodePlan = getEncodePlan(job) || {};
|
||||
return Boolean(encodePlan?.deleteInputsAfterMerge);
|
||||
}
|
||||
|
||||
function formatMergeTrackLanguage(language) {
|
||||
const normalized = String(language || '').trim().toLowerCase();
|
||||
if (!normalized || normalized === 'und') {
|
||||
@@ -2112,6 +2117,24 @@ export default function RipperPage({
|
||||
}
|
||||
};
|
||||
|
||||
const handleUpdateMultipartMergeSettings = async (jobId, settings = {}) => {
|
||||
const normalizedJobId = normalizeJobId(jobId);
|
||||
if (!normalizedJobId) {
|
||||
return;
|
||||
}
|
||||
setJobBusy(normalizedJobId, true);
|
||||
try {
|
||||
await api.updateMultipartMergeSettings(normalizedJobId, settings);
|
||||
await refreshPipeline();
|
||||
await loadRipperJobs();
|
||||
setExpandedJobId(normalizedJobId);
|
||||
} catch (error) {
|
||||
showError(error);
|
||||
} finally {
|
||||
setJobBusy(normalizedJobId, false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSaveActivationBytes = async () => {
|
||||
const { checksum, jobId } = activationBytesDialog;
|
||||
const bytes = activationBytesInput.trim().toLowerCase();
|
||||
@@ -3352,14 +3375,17 @@ export default function RipperPage({
|
||||
|| null
|
||||
)
|
||||
: null;
|
||||
const rawProgress = hasSeriesBatchProgress
|
||||
const isCancelledState = normalizedStatus === 'CANCELLED' || jobState === 'CANCELLED';
|
||||
const rawProgress = isCancelledState
|
||||
? 0
|
||||
: (hasSeriesBatchProgress
|
||||
? seriesBatchAggregateProgress
|
||||
: Number(pipelineForJob?.progress ?? 0);
|
||||
: Number(pipelineForJob?.progress ?? 0));
|
||||
const clampedProgress = Number.isFinite(rawProgress)
|
||||
? Math.max(0, Math.min(100, rawProgress))
|
||||
: 0;
|
||||
const progressLabel = `${Math.round(clampedProgress)}%`;
|
||||
const etaLabel = String(
|
||||
const etaLabel = isCancelledState ? '' : String(
|
||||
hasSeriesBatchProgress
|
||||
? (runningSeriesChild?.eta || pipelineForJob?.eta || '')
|
||||
: (pipelineForJob?.eta || '')
|
||||
@@ -3382,6 +3408,12 @@ export default function RipperPage({
|
||||
isMultipartMerge && multipartMergeLiveLogLoadingByJobId[jobId]
|
||||
);
|
||||
const isMultipartMergeRunning = isMultipartMerge && normalizedStatus === 'ENCODING';
|
||||
const deleteInputsAfterMerge = isMultipartMerge
|
||||
? shouldDeleteMultipartMergeInputsAfterSuccess(job)
|
||||
: false;
|
||||
const canEditMultipartMergeSettings = !busyJobIds.has(jobId)
|
||||
&& !processingStates.includes(normalizedStatus)
|
||||
&& !isQueued;
|
||||
const multipartMergeCommandPreview = String(multipartMergePreview?.command?.preview || '').trim();
|
||||
const multipartMergeChapterEntries = Array.isArray(multipartMergePreview?.chapters?.entries)
|
||||
? multipartMergePreview.chapters.entries
|
||||
@@ -3677,6 +3709,26 @@ export default function RipperPage({
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{!isMultipartMergeRunning ? (
|
||||
<div className="multipart-merge-settings">
|
||||
<label className="multipart-merge-setting-toggle">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={deleteInputsAfterMerge}
|
||||
onChange={(event) => {
|
||||
void handleUpdateMultipartMergeSettings(jobId, {
|
||||
deleteInputsAfterMerge: Boolean(event.target?.checked)
|
||||
});
|
||||
}}
|
||||
disabled={!canEditMultipartMergeSettings}
|
||||
/>
|
||||
<span>Input-Dateien nach erfolgreichem Merge löschen</span>
|
||||
</label>
|
||||
<small className="muted-inline">
|
||||
Bei Erfolg werden die Quell-Dateien der Discs aus dem Dateisystem entfernt.
|
||||
</small>
|
||||
</div>
|
||||
) : null}
|
||||
<div className="multipart-merge-actions">
|
||||
{(normalizedStatus === 'READY_TO_START' || normalizedStatus === 'READY_TO_ENCODE') ? (
|
||||
<Button
|
||||
|
||||
Reference in new issue
Block a user