This commit is contained in:
2026-03-13 22:11:24 +00:00
parent 4d377f3eb4
commit 1da5ee3e34
3 changed files with 36 additions and 12 deletions

View File

@@ -1607,7 +1607,10 @@ class HistoryService {
source: 'orphan_raw_import', source: 'orphan_raw_import',
importedAt, importedAt,
rawPath: finalRawPath, rawPath: finalRawPath,
mediaProfile: detectedMediaType mediaProfile: detectedMediaType,
analyzeContext: {
mediaProfile: detectedMediaType
}
}) })
}); });

View File

@@ -9887,11 +9887,9 @@ class PipelineService extends EventEmitter {
encode_plan_json: null, encode_plan_json: null,
encode_input_path: normalizedReviewInputPath || null, encode_input_path: normalizedReviewInputPath || null,
encode_review_confirmed: 0, encode_review_confirmed: 0,
makemkv_info_json: nextMakemkvInfoJson makemkv_info_json: nextMakemkvInfoJson,
raw_path: resolvedReviewRawPath
}; };
if (resolvedReviewRawPath !== sourceJob.raw_path) {
jobUpdatePayload.raw_path = resolvedReviewRawPath;
}
const replacementJob = await historyService.createJob({ const replacementJob = await historyService.createJob({
discDevice: sourceJob.disc_device || null, discDevice: sourceJob.disc_device || null,

View File

@@ -42,6 +42,9 @@ function resolveMediaType(row) {
if (['dvd', 'disc', 'dvdvideo', 'dvd-video', 'dvdrom', 'dvd-rom', 'video_ts', 'iso9660'].includes(raw)) { if (['dvd', 'disc', 'dvdvideo', 'dvd-video', 'dvdrom', 'dvd-rom', 'video_ts', 'iso9660'].includes(raw)) {
return 'dvd'; return 'dvd';
} }
if (['cd', 'audio_cd'].includes(raw)) {
return 'cd';
}
} }
return 'other'; return 'other';
} }
@@ -467,7 +470,7 @@ export default function DatabasePage() {
const handleImportOrphanRaw = async (row) => { const handleImportOrphanRaw = async (row) => {
const target = row?.rawPath || row?.folderName || '-'; const target = row?.rawPath || row?.folderName || '-';
const confirmed = window.confirm(`Für RAW-Ordner "${target}" einen neuen Historienjob anlegen?`); const confirmed = window.confirm(`Für RAW-Ordner "${target}" einen neuen Historienjob anlegen und direkt scannen?`);
if (!confirmed) { if (!confirmed) {
return; return;
} }
@@ -475,12 +478,32 @@ export default function DatabasePage() {
setOrphanImportBusyPath(row.rawPath); setOrphanImportBusyPath(row.rawPath);
try { try {
const response = await api.importOrphanRawFolder(row.rawPath); const response = await api.importOrphanRawFolder(row.rawPath);
toastRef.current?.show({ const newJobId = response?.job?.id;
severity: 'success', if (newJobId) {
summary: 'Job angelegt', try {
detail: `Historieneintrag #${response?.job?.id || '-'} wurde erstellt.`, await api.reencodeJob(newJobId);
life: 3500 toastRef.current?.show({
}); severity: 'success',
summary: 'Job angelegt & Scan gestartet',
detail: `Historieneintrag #${newJobId} erstellt, Mediainfo-Scan läuft.`,
life: 4000
});
} catch (scanError) {
toastRef.current?.show({
severity: 'info',
summary: 'Job angelegt',
detail: `Historieneintrag #${newJobId} erstellt. Scan konnte nicht automatisch gestartet werden: ${scanError.message}`,
life: 6000
});
}
} else {
toastRef.current?.show({
severity: 'success',
summary: 'Job angelegt',
detail: `Historieneintrag wurde erstellt.`,
life: 3500
});
}
await load(); await load();
} catch (error) { } catch (error) {
toastRef.current?.show({ toastRef.current?.show({