getFormSettings() for appType 'general' was missing proxy fields
(proxy_enabled, proxy_type, proxy_hostname, proxy_port, proxy_username,
proxy_password, proxy_ignored_addresses) and other newer fields
(show_nzb_hunt_on_home, tmdb_image_cache_days, web_server_threads).
The setupSettingsManualSave in general.js calls getFormSettings() which
was never updated when proxy UI was added. Added all missing fields.
- database.py: improved health check (SELECT sqlite_master instead of SELECT 1),
added _is_corruption_error(), _trigger_corruption_recovery() with 30s cooldown
and thread-safe locking, _check_and_recover_corruption() for callers
- stats_manager: load_stats, load_hourly_caps, load_hourly_caps_for_api, get_stats
now trigger corruption recovery on malformed DB errors
- settings_manager: load_settings and save_settings trigger recovery
- stateful_manager: get_processed_ids and get_lock_info trigger recovery
- state.py: set_last_reset_time triggers recovery
- cycle_tracker.py: end_cycle triggers recovery
- background.py: RSS Sync error handler triggers recovery
- requestarr: set_default_instances in both __init__ and routes trigger recovery
This stops the infinite error spam loop where a single disk I/O error
cascades into permanent 'database disk image is malformed' on every
subsequent operation. Recovery: WAL checkpoint first, then full backup +
rebuild if needed, with user/settings data salvaged from corrupted DB.