diff --git a/app/src/hooks/useForm.js b/app/src/hooks/useForm.js index eaf14fb8..ff76fa7b 100644 --- a/app/src/hooks/useForm.js +++ b/app/src/hooks/useForm.js @@ -150,11 +150,10 @@ export function useForm({ let {type, value} = e.target; let {path} = e.target.dataset; path = path || e.target.name; - if (type === 'number' && !isNaN(value)) { + if (type === 'number' && value !== '' && !isNaN(value)) { // Use parseFloat (not parseInt) so decimal values (sleep_requests=0.75, durations, etc.) // coming from are preserved as floats. - // This fixes the TypeError when those values later reach Python's > 0 comparison. - // Whole numbers (e.g. 42) remain proper numbers. + // The explicit empty-string check prevents isNaN('') === false from producing NaN in state. value = parseFloat(value); } console.debug('handleInputEvent', 'path=', path, 'type=', type, 'value=', value); diff --git a/modules/videos/lib.py b/modules/videos/lib.py index dbda2b26..e3682aca 100644 --- a/modules/videos/lib.py +++ b/modules/videos/lib.py @@ -789,7 +789,9 @@ def get_effective_video_settings(download_settings: dict = None) -> dict: try: effective['sleep_requests'] = float(effective['sleep_requests']) except (TypeError, ValueError): - effective['sleep_requests'] = 0.0 + # Remove corrupt value so the global config default (already populated + # earlier via _extract_global_inheritable) takes effect. + del effective['sleep_requests'] return effective