Readme
This commit is contained in:
@@ -949,7 +949,9 @@ class SettingsService {
|
|||||||
const ripMode = String(map.makemkv_rip_mode || 'mkv').trim().toLowerCase() === 'backup'
|
const ripMode = String(map.makemkv_rip_mode || 'mkv').trim().toLowerCase() === 'backup'
|
||||||
? 'backup'
|
? 'backup'
|
||||||
: 'mkv';
|
: 'mkv';
|
||||||
const sourceArg = this.resolveSourceArg(map, deviceInfo);
|
const sourceArg = ripMode === 'backup'
|
||||||
|
? this.resolveBackupSourceArg(map, deviceInfo)
|
||||||
|
: this.resolveSourceArg(map, deviceInfo);
|
||||||
const rawSelectedTitleId = normalizeNonNegativeInteger(options?.selectedTitleId);
|
const rawSelectedTitleId = normalizeNonNegativeInteger(options?.selectedTitleId);
|
||||||
const parsedExtra = splitArgs(map.makemkv_rip_extra_args);
|
const parsedExtra = splitArgs(map.makemkv_rip_extra_args);
|
||||||
let extra = [];
|
let extra = [];
|
||||||
@@ -1008,6 +1010,20 @@ class SettingsService {
|
|||||||
return { cmd, args: [...baseArgs, ...extra] };
|
return { cmd, args: [...baseArgs, ...extra] };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resolveBackupSourceArg(map, deviceInfo = null) {
|
||||||
|
const rawDeviceIndex = Number(deviceInfo?.index);
|
||||||
|
if (Number.isFinite(rawDeviceIndex) && rawDeviceIndex >= 0) {
|
||||||
|
return `disc:${Math.trunc(rawDeviceIndex)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const rawConfiguredIndex = Number(map?.makemkv_source_index);
|
||||||
|
if (Number.isFinite(rawConfiguredIndex) && rawConfiguredIndex >= 0) {
|
||||||
|
return `disc:${Math.trunc(rawConfiguredIndex)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'disc:0';
|
||||||
|
}
|
||||||
|
|
||||||
async buildMakeMKVRegisterConfig() {
|
async buildMakeMKVRegisterConfig() {
|
||||||
const map = await this.getSettingsMap();
|
const map = await this.getSettingsMap();
|
||||||
const registrationKey = String(map.makemkv_registration_key || '').trim();
|
const registrationKey = String(map.makemkv_registration_key || '').trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user