Fix
This commit is contained in:
@@ -1607,7 +1607,10 @@ class HistoryService {
|
|||||||
source: 'orphan_raw_import',
|
source: 'orphan_raw_import',
|
||||||
importedAt,
|
importedAt,
|
||||||
rawPath: finalRawPath,
|
rawPath: finalRawPath,
|
||||||
|
mediaProfile: detectedMediaType,
|
||||||
|
analyzeContext: {
|
||||||
mediaProfile: detectedMediaType
|
mediaProfile: detectedMediaType
|
||||||
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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);
|
||||||
|
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({
|
toastRef.current?.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
summary: 'Job angelegt',
|
summary: 'Job angelegt',
|
||||||
detail: `Historieneintrag #${response?.job?.id || '-'} wurde erstellt.`,
|
detail: `Historieneintrag wurde erstellt.`,
|
||||||
life: 3500
|
life: 3500
|
||||||
});
|
});
|
||||||
|
}
|
||||||
await load();
|
await load();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
toastRef.current?.show({
|
toastRef.current?.show({
|
||||||
|
|||||||
Reference in New Issue
Block a user