Add independent Blasphemy Mode setting for lossy converter job
The lossy converter fix handler now reads delete_original from its own job settings (repair.jobs.lossy_converter.settings.delete_original) instead of the global lossy_copy.delete_original. Defaults to false. Separate from the per-download Blasphemy Mode toggle in Settings.
This commit is contained in:
parent
adefe1c892
commit
bd27bbe1b2
2 changed files with 7 additions and 3 deletions
|
|
@ -55,7 +55,9 @@ class LossyConverterJob(RepairJob):
|
||||||
icon = 'repair-icon-lossy'
|
icon = 'repair-icon-lossy'
|
||||||
default_enabled = False
|
default_enabled = False
|
||||||
default_interval_hours = 0 # Manual only
|
default_interval_hours = 0 # Manual only
|
||||||
default_settings = {}
|
default_settings = {
|
||||||
|
'delete_original': False, # Blasphemy Mode — delete FLAC after conversion
|
||||||
|
}
|
||||||
auto_fix = False
|
auto_fix = False
|
||||||
|
|
||||||
def scan(self, context: JobContext) -> JobResult:
|
def scan(self, context: JobContext) -> JobResult:
|
||||||
|
|
|
||||||
|
|
@ -1989,10 +1989,12 @@ class RepairWorker:
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Blasphemy Mode — delete original if enabled
|
# Blasphemy Mode — uses the job's own setting, not the global lossy_copy one
|
||||||
delete_original = False
|
delete_original = False
|
||||||
if self._config_manager:
|
if self._config_manager:
|
||||||
delete_original = self._config_manager.get('lossy_copy.delete_original', False)
|
job_settings = self._config_manager.get('repair.jobs.lossy_converter.settings', {})
|
||||||
|
if isinstance(job_settings, dict):
|
||||||
|
delete_original = job_settings.get('delete_original', False)
|
||||||
|
|
||||||
if delete_original:
|
if delete_original:
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue