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',
importedAt,
rawPath: finalRawPath,
mediaProfile: detectedMediaType
mediaProfile: detectedMediaType,
analyzeContext: {
mediaProfile: detectedMediaType
}
})
});

View File

@@ -9887,11 +9887,9 @@ class PipelineService extends EventEmitter {
encode_plan_json: null,
encode_input_path: normalizedReviewInputPath || null,
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({
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)) {
return 'dvd';
}
if (['cd', 'audio_cd'].includes(raw)) {
return 'cd';
}
}
return 'other';
}
@@ -467,7 +470,7 @@ export default function DatabasePage() {
const handleImportOrphanRaw = async (row) => {
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) {
return;
}
@@ -475,12 +478,32 @@ export default function DatabasePage() {
setOrphanImportBusyPath(row.rawPath);
try {
const response = await api.importOrphanRawFolder(row.rawPath);
toastRef.current?.show({
severity: 'success',
summary: 'Job angelegt',
detail: `Historieneintrag #${response?.job?.id || '-'} wurde erstellt.`,
life: 3500
});
const newJobId = response?.job?.id;
if (newJobId) {
try {
await api.reencodeJob(newJobId);
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();
} catch (error) {
toastRef.current?.show({