0.12.0-2 Checkable Infrastructure
This commit is contained in:
@@ -1003,7 +1003,7 @@ async function migrateSettingsSchemaMetadata(db) {
|
||||
// ✅ = plugin-pfad aktiv ⏳ = noch nicht implementiert (readonly, immer aus)
|
||||
//
|
||||
// BluRay / DVD: Analyse ✅ Rip ✅ Review ⏳ Encode ⏳
|
||||
// CD: Analyse ✅ Rip ⏳
|
||||
// CD: Analyse ✅ Rip ✅
|
||||
// Audiobook: Analyse ✅ Encode ⏳
|
||||
|
||||
const pluginArchitectureSettings = [
|
||||
@@ -1130,12 +1130,12 @@ async function migrateSettingsSchemaMetadata(db) {
|
||||
},
|
||||
{
|
||||
key: 'use_plugin_architecture_cd_rip',
|
||||
label: 'Rip + Encode (Audio-CD)',
|
||||
description: 'Noch nicht implementiert — cdparanoia-Rip läuft noch über Legacy.',
|
||||
defaultValue: 'false',
|
||||
label: 'Rip (Audio-CD)',
|
||||
description: 'CD-Rip/RAW-Rip/Encode-aus-RAW läuft über das Plugin.',
|
||||
defaultValue: 'true',
|
||||
orderIndex: 10022,
|
||||
dependsOn: 'use_plugin_architecture_cd',
|
||||
validationJson: '{"readonly":true}'
|
||||
validationJson: '{}'
|
||||
},
|
||||
// ── Audiobook ────────────────────────────────────────────────────────────
|
||||
{
|
||||
@@ -1178,6 +1178,13 @@ async function migrateSettingsSchemaMetadata(db) {
|
||||
WHERE key = ? AND (depends_on IS NOT ? OR order_index != ? OR validation_json != ?)`,
|
||||
[setting.dependsOn ?? null, setting.orderIndex, setting.validationJson, setting.key, setting.dependsOn ?? null, setting.orderIndex, setting.validationJson]
|
||||
);
|
||||
await db.run(
|
||||
`UPDATE settings_schema
|
||||
SET label = ?, description = ?, default_value = ?, updated_at = CURRENT_TIMESTAMP
|
||||
WHERE key = ?
|
||||
AND (label != ? OR description != ? OR COALESCE(default_value, '') != COALESCE(?, ''))`,
|
||||
[setting.label, setting.description, setting.defaultValue, setting.key, setting.label, setting.description, setting.defaultValue]
|
||||
);
|
||||
await db.run(`INSERT OR IGNORE INTO settings_values (key, value) VALUES (?, ?)`, [setting.key, setting.defaultValue]);
|
||||
// Readonly-Toggles immer auf 'false' zurücksetzen (nie aktivierbar)
|
||||
if (setting.validationJson === '{"readonly":true}') {
|
||||
|
||||
@@ -94,9 +94,9 @@ class CdPlugin extends SourcePlugin {
|
||||
* läuft hier in einem einzigen cdRipService.ripAndEncode()-Aufruf.
|
||||
*
|
||||
* Pflicht-Felder in ctx.extra:
|
||||
* ripConfig - { format, formatOptions, selectedTracks, tracks, metadata }
|
||||
* ripConfig - { format, formatOptions, selectedTracks, tracks, metadata, skipRip, skipEncode }
|
||||
* rawWavDir - Pfad für temporäre WAV-Dateien (= RAW-Ordner)
|
||||
* outputDir - Finaler Ausgabeordner
|
||||
* outputDir - Finaler Ausgabeordner (optional bei skipEncode=true)
|
||||
* outputTemplate - Template-String für Dateinamen
|
||||
* isCancelled - () => boolean
|
||||
* onProcessHandle - (handle) => void [optional]
|
||||
@@ -118,13 +118,18 @@ class CdPlugin extends SourcePlugin {
|
||||
outputDir,
|
||||
outputTemplate,
|
||||
isCancelled,
|
||||
onProcessHandle
|
||||
onProcessHandle,
|
||||
onProgress: onRawProgress,
|
||||
onLog: onExternalLog
|
||||
} = ctx.extra || {};
|
||||
|
||||
if (!rawWavDir) {
|
||||
throw new Error('CdPlugin.rip(): ctx.extra.rawWavDir fehlt');
|
||||
}
|
||||
if (!outputDir) {
|
||||
const skipRip = Boolean(ripConfig?.skipRip);
|
||||
const skipEncode = Boolean(ripConfig?.skipEncode);
|
||||
|
||||
if (!skipEncode && !outputDir) {
|
||||
throw new Error('CdPlugin.rip(): ctx.extra.outputDir fehlt');
|
||||
}
|
||||
|
||||
@@ -132,8 +137,7 @@ class CdPlugin extends SourcePlugin {
|
||||
const settings = await ctx.settings.getSettingsMap();
|
||||
const cdparanoiaCmd = String(cdInfo.cdparanoiaCmd || settings.cdparanoia_command || 'cdparanoia').trim() || 'cdparanoia';
|
||||
const devicePath = String(job?.disc_device || '').trim();
|
||||
|
||||
if (!devicePath) {
|
||||
if (!devicePath && !skipRip) {
|
||||
throw new Error('CdPlugin.rip(): Kein CD-Gerätepfad im Job gefunden (disc_device leer).');
|
||||
}
|
||||
|
||||
@@ -189,14 +193,16 @@ class CdPlugin extends SourcePlugin {
|
||||
|
||||
ctx.logger.info('cd:rip:start', {
|
||||
jobId: job?.id,
|
||||
devicePath,
|
||||
devicePath: devicePath || null,
|
||||
skipRip,
|
||||
skipEncode,
|
||||
format,
|
||||
trackCount: selectedTrackPositions.length
|
||||
});
|
||||
|
||||
const result = await cdRipService.ripAndEncode({
|
||||
jobId: job?.id,
|
||||
devicePath,
|
||||
devicePath: devicePath || null,
|
||||
cdparanoiaCmd,
|
||||
rawWavDir,
|
||||
outputDir,
|
||||
@@ -206,7 +212,12 @@ class CdPlugin extends SourcePlugin {
|
||||
tracks: mergedTracks,
|
||||
meta,
|
||||
outputTemplate: effectiveTemplate,
|
||||
skipRip,
|
||||
skipEncode,
|
||||
onProgress: (progressEvent) => {
|
||||
if (typeof onRawProgress === 'function') {
|
||||
onRawProgress(progressEvent);
|
||||
}
|
||||
const pct = Number(progressEvent?.percent ?? 0);
|
||||
const phase = progressEvent?.phase === 'encode' ? 'Encodiere' : 'Rippe';
|
||||
const trackIdx = progressEvent?.trackIndex || 1;
|
||||
@@ -220,6 +231,9 @@ class CdPlugin extends SourcePlugin {
|
||||
if (ctx.logger[level]) {
|
||||
ctx.logger[level](msg, { jobId: job?.id });
|
||||
}
|
||||
if (typeof onExternalLog === 'function') {
|
||||
onExternalLog(level, msg);
|
||||
}
|
||||
},
|
||||
onProcessHandle,
|
||||
isCancelled,
|
||||
|
||||
@@ -148,6 +148,10 @@ router.post(
|
||||
const id = Number(req.params.id);
|
||||
const target = String(req.body?.target || 'none');
|
||||
const includeRelated = ['1', 'true', 'yes'].includes(String(req.body?.includeRelated || 'false').toLowerCase());
|
||||
const resetDriveState = ['1', 'true', 'yes'].includes(String(req.body?.resetDriveState || 'false').toLowerCase());
|
||||
const keepDetectedDevice = req.body?.keepDetectedDevice !== undefined
|
||||
? ['1', 'true', 'yes'].includes(String(req.body?.keepDetectedDevice || 'false').toLowerCase())
|
||||
: !resetDriveState;
|
||||
const selectedMoviePaths = Array.isArray(req.body?.selectedMoviePaths)
|
||||
? req.body.selectedMoviePaths
|
||||
.map((item) => String(item || '').trim())
|
||||
@@ -159,11 +163,29 @@ router.post(
|
||||
id,
|
||||
target,
|
||||
includeRelated,
|
||||
resetDriveState,
|
||||
keepDetectedDevice,
|
||||
selectedMoviePathCount: selectedMoviePaths ? selectedMoviePaths.length : 0
|
||||
});
|
||||
|
||||
const preview = resetDriveState
|
||||
? await historyService.getJobDeletePreview(id, { includeRelated })
|
||||
: null;
|
||||
const relatedDevicePaths = Array.isArray(preview?.relatedJobs)
|
||||
? preview.relatedJobs
|
||||
.map((row) => String(row?.discDevice || '').trim())
|
||||
.filter(Boolean)
|
||||
: [];
|
||||
const result = await historyService.deleteJob(id, target, { includeRelated, selectedMoviePaths });
|
||||
const uiReset = await pipelineService.resetFrontendState('history_delete');
|
||||
await pipelineService.onJobsDeleted(result?.deletedJobIds || [id], {
|
||||
resetDriveState,
|
||||
devicePaths: relatedDevicePaths
|
||||
}).catch((error) => {
|
||||
logger.warn('post:delete-job:cleanup-failed', { id, error: error?.message || String(error) });
|
||||
});
|
||||
const uiReset = await pipelineService.resetFrontendState('history_delete', {
|
||||
keepDetectedDevice
|
||||
});
|
||||
res.json({ ...result, uiReset });
|
||||
})
|
||||
);
|
||||
|
||||
@@ -22,13 +22,16 @@ const DEFAULT_CD_OUTPUT_TEMPLATE = '{artist} - {album} ({year})/{trackNr} {artis
|
||||
function parseToc(tocOutput) {
|
||||
const lines = String(tocOutput || '').split(/\r?\n/);
|
||||
const tracks = [];
|
||||
const tocTimePattern = /[\(\[]\s*\d+:\d+(?:[.,:]\d+)?\s*[\)\]]/g;
|
||||
const tocTablePattern =
|
||||
/^\s*(\d+)\.?\s+(\d+)\s+[\(\[]\s*\d+:\d+(?:[.,:]\d+)?\s*[\)\]]\s+(\d+)\s+[\(\[]\s*\d+:\d+(?:[.,:]\d+)?\s*[\)\]]/i;
|
||||
|
||||
for (const line of lines) {
|
||||
const trackMatch = line.match(/^\s*track\s+(\d+)\s*:\s*(.+)$/i);
|
||||
if (trackMatch) {
|
||||
const position = Number(trackMatch[1]);
|
||||
const payloadWithoutTimes = String(trackMatch[2] || '')
|
||||
.replace(/[\(\[]\s*\d+:\d+\.\d+\s*[\)\]]/g, ' ');
|
||||
.replace(tocTimePattern, ' ');
|
||||
const sectorValues = payloadWithoutTimes.match(/\d+/g) || [];
|
||||
if (sectorValues.length < 2) {
|
||||
continue;
|
||||
@@ -58,9 +61,7 @@ function parseToc(tocOutput) {
|
||||
// Alternative cdparanoia -Q table style:
|
||||
// 1. 16503 [03:40.03] 0 [00:00.00] no no 2
|
||||
// ^ length sectors ^ start sector
|
||||
const tableMatch = line.match(
|
||||
/^\s*(\d+)\.?\s+(\d+)\s+[\(\[]\d+:\d+\.\d+[\)\]]\s+(\d+)\s+[\(\[]\d+:\d+\.\d+[\)\]]/i
|
||||
);
|
||||
const tableMatch = line.match(tocTablePattern);
|
||||
if (!tableMatch) {
|
||||
continue;
|
||||
}
|
||||
@@ -395,6 +396,7 @@ async function runProcessTracked({
|
||||
* @param {object[]} options.tracks - TOC track list [{position, durationMs, title}]
|
||||
* @param {object} options.meta - album metadata {title, artist, year}
|
||||
* @param {string} options.outputTemplate - template for relative output path without extension
|
||||
* @param {boolean} options.skipEncode - true => rip only (no encode)
|
||||
* @param {Function} options.onProgress - ({phase, trackIndex, trackTotal, percent, track}) => void
|
||||
* @param {Function} options.onLog - (level, msg) => void
|
||||
* @param {Function} options.onProcessHandle- called with spawned process handle for cancellation integration
|
||||
@@ -419,10 +421,11 @@ async function ripAndEncode(options) {
|
||||
onProcessHandle,
|
||||
isCancelled,
|
||||
context,
|
||||
skipRip = false
|
||||
skipRip = false,
|
||||
skipEncode = false
|
||||
} = options;
|
||||
|
||||
if (!SUPPORTED_FORMATS.has(format)) {
|
||||
if (!skipEncode && !SUPPORTED_FORMATS.has(format)) {
|
||||
throw new Error(`Unbekanntes Ausgabeformat: ${format}`);
|
||||
}
|
||||
|
||||
@@ -435,7 +438,9 @@ async function ripAndEncode(options) {
|
||||
}
|
||||
|
||||
await ensureDir(rawWavDir);
|
||||
await ensureDir(outputDir);
|
||||
if (!skipEncode) {
|
||||
await ensureDir(outputDir);
|
||||
}
|
||||
|
||||
logger.info('rip:start', {
|
||||
jobId,
|
||||
@@ -448,6 +453,9 @@ async function ripAndEncode(options) {
|
||||
logger[level] && logger[level](msg, { jobId });
|
||||
onLog && onLog(level, msg);
|
||||
};
|
||||
const ripPercentSpan = skipEncode ? 100 : 50;
|
||||
const encodePercentStart = ripPercentSpan;
|
||||
const encodePercentSpan = Math.max(0, 100 - encodePercentStart);
|
||||
|
||||
// ── Phase 1: Rip each selected track to WAV ──────────────────────────────
|
||||
if (skipRip) {
|
||||
@@ -472,7 +480,7 @@ async function ripAndEncode(options) {
|
||||
trackTotal: tracksToRip.length,
|
||||
trackPosition: track.position,
|
||||
trackPercent: 0,
|
||||
percent: (i / tracksToRip.length) * 50
|
||||
percent: (i / tracksToRip.length) * ripPercentSpan
|
||||
});
|
||||
|
||||
log('info', `Rippe Track ${track.position} von ${tracksToRip.length} …`);
|
||||
@@ -486,7 +494,7 @@ async function ripAndEncode(options) {
|
||||
onStderrLine(line) {
|
||||
const parsed = parseCdParanoiaProgress(line);
|
||||
if (parsed && parsed.percent !== null) {
|
||||
const overallPercent = ((i + parsed.percent / 100) / tracksToRip.length) * 50;
|
||||
const overallPercent = ((i + parsed.percent / 100) / tracksToRip.length) * ripPercentSpan;
|
||||
onProgress && onProgress({
|
||||
phase: 'rip',
|
||||
trackEvent: 'progress',
|
||||
@@ -518,13 +526,22 @@ async function ripAndEncode(options) {
|
||||
trackTotal: tracksToRip.length,
|
||||
trackPosition: track.position,
|
||||
trackPercent: 100,
|
||||
percent: ((i + 1) / tracksToRip.length) * 50
|
||||
percent: ((i + 1) / tracksToRip.length) * ripPercentSpan
|
||||
});
|
||||
|
||||
log('info', `Track ${track.position} gerippt.`);
|
||||
}
|
||||
} // end if (!skipRip)
|
||||
|
||||
if (skipEncode) {
|
||||
return {
|
||||
outputDir: null,
|
||||
format: 'raw',
|
||||
trackCount: tracksToRip.length,
|
||||
encodeResults: []
|
||||
};
|
||||
}
|
||||
|
||||
// ── Phase 2: Encode WAVs to target format ─────────────────────────────────
|
||||
const encodeResults = [];
|
||||
|
||||
@@ -542,7 +559,7 @@ async function ripAndEncode(options) {
|
||||
trackTotal: tracksToRip.length,
|
||||
trackPosition: track.position,
|
||||
trackPercent: 0,
|
||||
percent: 50 + ((i / tracksToRip.length) * 50)
|
||||
percent: encodePercentStart + ((i / tracksToRip.length) * encodePercentSpan)
|
||||
});
|
||||
ensureDir(path.dirname(outFile));
|
||||
log('info', `Promptkette [Copy ${i + 1}/${tracksToRip.length}]: cp ${quoteShellArg(wavFile)} ${quoteShellArg(outFile)}`);
|
||||
@@ -554,7 +571,7 @@ async function ripAndEncode(options) {
|
||||
trackTotal: tracksToRip.length,
|
||||
trackPosition: track.position,
|
||||
trackPercent: 100,
|
||||
percent: 50 + ((i + 1) / tracksToRip.length) * 50
|
||||
percent: encodePercentStart + ((i + 1) / tracksToRip.length) * encodePercentSpan
|
||||
});
|
||||
log('info', `WAV für Track ${track.position} gespeichert.`);
|
||||
encodeResults.push({ position: track.position, title: track.title || '', outputFile: path.basename(outFile), success: true });
|
||||
@@ -581,7 +598,7 @@ async function ripAndEncode(options) {
|
||||
trackTotal: tracksToRip.length,
|
||||
trackPosition: track.position,
|
||||
trackPercent: 0,
|
||||
percent: 50 + ((i / tracksToRip.length) * 50)
|
||||
percent: encodePercentStart + ((i / tracksToRip.length) * encodePercentSpan)
|
||||
});
|
||||
|
||||
log('info', `Encodiere Track ${track.position} → ${outFilename} …`);
|
||||
@@ -628,7 +645,7 @@ async function ripAndEncode(options) {
|
||||
trackTotal: tracksToRip.length,
|
||||
trackPosition: track.position,
|
||||
trackPercent: 100,
|
||||
percent: 50 + ((i + 1) / tracksToRip.length) * 50
|
||||
percent: encodePercentStart + ((i + 1) / tracksToRip.length) * encodePercentSpan
|
||||
});
|
||||
|
||||
log('info', `Track ${track.position} encodiert.`);
|
||||
|
||||
@@ -159,6 +159,11 @@ function inferMediaProfileFromFsTypeAndModel(rawFsType, rawModel) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function isIsoLikeFsType(rawFsType) {
|
||||
const fstype = String(rawFsType || '').trim().toLowerCase();
|
||||
return fstype.includes('iso9660') || fstype.includes('cdfs');
|
||||
}
|
||||
|
||||
function inferMediaProfileFromUdevProperties(properties = {}) {
|
||||
const flags = Object.entries(properties).reduce((acc, [key, rawValue]) => {
|
||||
const normalizedKey = String(key || '').trim().toUpperCase();
|
||||
@@ -535,6 +540,19 @@ class DiskDetectionService extends EventEmitter {
|
||||
if (!normalized) {
|
||||
return { present: false, emitted: 'none', device: null };
|
||||
}
|
||||
if (this.isDeviceLocked(normalized)) {
|
||||
const existing = this.detectedDiscs.get(normalized) || null;
|
||||
logger.info('rescan-drive:skip-locked', {
|
||||
devicePath: normalized,
|
||||
activeLocks: this.getActiveLocks()
|
||||
});
|
||||
return {
|
||||
present: Boolean(existing),
|
||||
emitted: 'none',
|
||||
device: existing,
|
||||
locked: true
|
||||
};
|
||||
}
|
||||
try {
|
||||
logger.info('rescan-drive:requested', { devicePath: normalized });
|
||||
const detected = await this.detectExplicit(normalized);
|
||||
@@ -598,6 +616,16 @@ class DiskDetectionService extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
// Preserve currently tracked locked devices that are intentionally skipped
|
||||
// by detectAll* while a rip lock is active.
|
||||
for (const [devicePath, device] of this.detectedDiscs) {
|
||||
if (newMap.has(devicePath) || !this.isDeviceLocked(devicePath)) {
|
||||
continue;
|
||||
}
|
||||
newMap.set(devicePath, device);
|
||||
results.push({ path: devicePath, emitted: 'none', device, locked: true });
|
||||
}
|
||||
|
||||
// Check for removed devices
|
||||
for (const [devicePath, device] of this.detectedDiscs) {
|
||||
if (!newMap.has(devicePath)) {
|
||||
@@ -652,9 +680,15 @@ class DiskDetectionService extends EventEmitter {
|
||||
if (!mediaState.hasMedia && hasSizeMedia) {
|
||||
logger.debug('detect:explicit:media-by-size-fallback', { devicePath, sizeBytes: match.sizeBytes });
|
||||
}
|
||||
const mediaType = mediaState.type;
|
||||
const mediaType = String(mediaState.type || '').trim().toLowerCase() || null;
|
||||
const discLabel = await this.getDiscLabel(devicePath);
|
||||
const detectedFsType = String(match.fstype || mediaType || '').trim() || null;
|
||||
// Preserve explicit audio-CD detection from checkMediaPresent even if lsblk
|
||||
// reports ambiguous optical fs markers like iso9660/cdfs.
|
||||
const detectedFsType = String(
|
||||
mediaType === 'audio_cd'
|
||||
? mediaType
|
||||
: (match.fstype || mediaType || '')
|
||||
).trim() || null;
|
||||
|
||||
const mediaProfile = await this.inferMediaProfile(devicePath, {
|
||||
discLabel,
|
||||
@@ -702,8 +736,13 @@ class DiskDetectionService extends EventEmitter {
|
||||
if (!mediaState.hasMedia) {
|
||||
continue;
|
||||
}
|
||||
const mediaType = String(mediaState.type || '').trim().toLowerCase() || null;
|
||||
const discLabel = await this.getDiscLabel(path);
|
||||
const detectedFsType = String(item.fstype || mediaState.type || '').trim() || null;
|
||||
const detectedFsType = String(
|
||||
mediaType === 'audio_cd'
|
||||
? mediaType
|
||||
: (item.fstype || mediaType || '')
|
||||
).trim() || null;
|
||||
|
||||
const mediaProfile = await this.inferMediaProfile(path, {
|
||||
discLabel,
|
||||
@@ -764,9 +803,13 @@ class DiskDetectionService extends EventEmitter {
|
||||
if (!mediaState.hasMedia && hasSizeMedia) {
|
||||
logger.debug('detect:all-auto:media-by-size-fallback', { path, sizeBytes: item.sizeBytes });
|
||||
}
|
||||
const mediaType = mediaState.type;
|
||||
const mediaType = String(mediaState.type || '').trim().toLowerCase() || null;
|
||||
const discLabel = await this.getDiscLabel(path);
|
||||
const detectedFsType = String(item.fstype || mediaType || '').trim() || null;
|
||||
const detectedFsType = String(
|
||||
mediaType === 'audio_cd'
|
||||
? mediaType
|
||||
: (item.fstype || mediaType || '')
|
||||
).trim() || null;
|
||||
|
||||
const mediaProfile = await this.inferMediaProfile(path, {
|
||||
discLabel,
|
||||
@@ -871,6 +914,8 @@ class DiskDetectionService extends EventEmitter {
|
||||
return { hasMedia: true, type: blkidType };
|
||||
}
|
||||
|
||||
let hasOpticalMediaHintFromUdev = false;
|
||||
|
||||
// blkid found nothing – audio CDs have no filesystem, so fall back to udevadm
|
||||
try {
|
||||
const { stdout } = await execFileAsync('udevadm', [
|
||||
@@ -902,7 +947,10 @@ class DiskDetectionService extends EventEmitter {
|
||||
}
|
||||
if (inferredByUdev === 'bluray' || inferredByUdev === 'dvd') {
|
||||
logger.debug('udevadm:optical-media', { devicePath, inferredByUdev });
|
||||
return { hasMedia: true, type: null };
|
||||
// Keep this as a presence hint, but still probe cdparanoia. Some drives
|
||||
// expose mixed DVD/CD flags for audio CDs and would otherwise be
|
||||
// downgraded to "other" before TOC probing.
|
||||
hasOpticalMediaHintFromUdev = true;
|
||||
}
|
||||
} catch (_udevError) {
|
||||
// udevadm not available or failed – ignore
|
||||
@@ -919,6 +967,10 @@ class DiskDetectionService extends EventEmitter {
|
||||
return { hasMedia: true, type: 'audio_cd' };
|
||||
}
|
||||
|
||||
if (hasOpticalMediaHintFromUdev) {
|
||||
return { hasMedia: true, type: null };
|
||||
}
|
||||
|
||||
// Final fallback: check block device size via sysfs.
|
||||
// In VM/passthrough environments udev metadata may be absent even though
|
||||
// the kernel reports a valid disc size (visible in lsblk). A non-zero
|
||||
@@ -1046,7 +1098,12 @@ class DiskDetectionService extends EventEmitter {
|
||||
// Also guard: when hintFstype is empty (no filesystem info at all), the drive model
|
||||
// alone is not a reliable disc-type indicator — a BD-RE drive can contain a DVD.
|
||||
// In that case skip this early return and let blkid -p determine the actual disc type.
|
||||
if (hintFstype && byFsTypeHint && !(hintFstype.includes('udf') && byFsTypeHint !== 'bluray')) {
|
||||
if (
|
||||
hintFstype
|
||||
&& byFsTypeHint
|
||||
&& !(hintFstype.includes('udf') && byFsTypeHint !== 'bluray')
|
||||
&& !(isIsoLikeFsType(hintFstype) && byFsTypeHint === 'dvd')
|
||||
) {
|
||||
return byFsTypeHint;
|
||||
}
|
||||
|
||||
@@ -1090,14 +1147,14 @@ class DiskDetectionService extends EventEmitter {
|
||||
}
|
||||
|
||||
const byBlkidFsType = inferMediaProfileFromFsTypeAndModel(type, hints?.model);
|
||||
if (byBlkidFsType) {
|
||||
if (byBlkidFsType && !(isIsoLikeFsType(type) && byBlkidFsType === 'dvd')) {
|
||||
return byBlkidFsType;
|
||||
}
|
||||
|
||||
// Last resort for drives that only expose TYPE=udf without VERSION/APPLICATION_ID:
|
||||
// prefer DVD over "other" so DVDs in BD-capable drives do not fall back to Misc.
|
||||
const byBlkidFsTypeWithoutModel = inferMediaProfileFromFsTypeAndModel(type, null);
|
||||
if (byBlkidFsTypeWithoutModel) {
|
||||
if (byBlkidFsTypeWithoutModel && !(isIsoLikeFsType(type) && byBlkidFsTypeWithoutModel === 'dvd')) {
|
||||
return byBlkidFsTypeWithoutModel;
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -4114,6 +4114,7 @@ class HistoryService {
|
||||
parentJobId: normalizeJobIdValue(job.parent_job_id),
|
||||
title: buildJobDisplayTitle(job),
|
||||
status: String(job.status || '').trim() || null,
|
||||
discDevice: String(job.disc_device || '').trim() || null,
|
||||
isPrimary: Number(job.id) === normalizedJobId,
|
||||
createdAt: String(job.created_at || '').trim() || null
|
||||
}));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user