Persist and restore main window state
Restore window geometry/state on startup and save them on exit. Adds YTSageApp._load_window_state() and calls it during UI init; saves Base64-encoded geometry/state via ConfigManager when closing. Adds default config keys "window_geometry" and "window_state". Includes error handling and debug logging to avoid failures if stored values are invalid.
This commit is contained in:
@@ -96,6 +96,8 @@ class ConfigManager:
|
||||
"preferred_audio_format": "best",
|
||||
"audio_normalization": False,
|
||||
"filename_format": "%(title)s_%(resolution)s_[%(id)s].%(ext)s",
|
||||
"window_geometry": None,
|
||||
"window_state": None,
|
||||
"cached_versions": {
|
||||
"ytdlp": {"version": None, "path": None, "last_check": 0, "path_mtime": 0},
|
||||
"ffmpeg": {"version": None, "path": None, "last_check": 0, "path_mtime": 0},
|
||||
|
||||
Reference in New Issue
Block a user