chore: address Greptile P2 review comments on PR 449

- In get_effective_video_settings: on unparseable sleep_requests, delete
  the key instead of forcing 0.0. This lets the global config default
  (already present from _extract_global_inheritable) take effect, as
  suggested by Greptile.

- In handleInputEvent: add explicit `value !== ''` guard before the
  isNaN check. Prevents silent NaN in form state for empty number
  fields (isNaN('') === false in JS).

Both changes are strict improvements with no behavior change for
valid inputs.
This commit is contained in:
Roland 2026-05-31 12:53:04 -06:00
parent 9cc5c15e32
commit 345b69b7d7
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 5 additions and 4 deletions

View file

@ -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