DiskFix
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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 = {}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user