This commit is contained in:
2026-03-12 12:54:13 +00:00
parent ee6603ffad
commit 7948dd298c
2 changed files with 5 additions and 22 deletions

View File

@@ -8528,7 +8528,7 @@ class PipelineService extends EventEmitter {
const deviceCandidate = this.detectedDisc || this.snapshot.context?.device || { const deviceCandidate = this.detectedDisc || this.snapshot.context?.device || {
path: job.disc_device, path: job.disc_device,
index: Number(settings.makemkv_source_index || 0) index: 0
}; };
const deviceProfile = normalizeMediaProfile(deviceCandidate?.mediaProfile) const deviceProfile = normalizeMediaProfile(deviceCandidate?.mediaProfile)
|| inferMediaProfileFromDeviceInfo(deviceCandidate) || inferMediaProfileFromDeviceInfo(deviceCandidate)

View File

@@ -1308,27 +1308,10 @@ class SettingsService {
} }
resolveSourceArg(map, deviceInfo = null) { resolveSourceArg(map, deviceInfo = null) {
const mode = map.drive_mode; // Single-drive setup: always use MakeMKV's first logical disc device.
if (mode === 'explicit') { void map;
const device = map.drive_device; void deviceInfo;
if (!device) { return 'disc:0';
throw new Error('drive_device ist leer, obwohl drive_mode=explicit gesetzt ist.');
}
return `dev:${device}`;
}
const devicePath = String(deviceInfo?.path || '').trim();
if (devicePath) {
// Prefer stable Linux device path over MakeMKV disc index mapping.
// MakeMKV drive indices (disc:N) do not reliably match /dev/srN numbering.
return `dev:${devicePath}`;
}
if (deviceInfo && deviceInfo.index !== undefined && deviceInfo.index !== null) {
return `disc:${deviceInfo.index}`;
}
return `disc:${map.makemkv_source_index ?? 0}`;
} }
async loadHandBrakePresetOptionsFromCli(map = {}) { async loadHandBrakePresetOptionsFromCli(map = {}) {