Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b049904
Complete session save/load roundtrip
knguyen1 Sep 8, 2025
16f21c7
Refactor sessions manager and add unit tests
knguyen1 Sep 8, 2025
a596368
Session files should be compressed
knguyen1 Sep 8, 2025
b44d36e
Enable caching of mb data in sessions
knguyen1 Sep 8, 2025
8383a97
Do not catch blind exceptions
knguyen1 Sep 8, 2025
1251e9c
Apply single quote on dict/attr keys
knguyen1 Sep 8, 2025
b8c0b42
Zas code review 20250908; own close session confirm box
knguyen1 Sep 9, 2025
7bff0c4
Use try...except...else pattern
knguyen1 Sep 9, 2025
86eef7a
Add flyout menu for recent sessions
knguyen1 Sep 9, 2025
1c14bc4
Make session_folder configurable and default
knguyen1 Sep 9, 2025
69ca212
Clean up menus; add default filenames
knguyen1 Sep 10, 2025
7b7506c
`load_session` should default to the last_session_path
knguyen1 Sep 10, 2025
11de913
Fix failing Windows tests
knguyen1 Sep 10, 2025
722b3fc
Add atomic writes; fix crash during load session
knguyen1 Sep 10, 2025
a644edb
Refactor ; remove redundant code
knguyen1 Sep 10, 2025
6da5c74
Switch from json to yaml for session files
knguyen1 Sep 10, 2025
f18eb91
Refactor session loader for dry/srp
knguyen1 Sep 10, 2025
f437291
Fix bug with blank albums (no cache, no web)
knguyen1 Sep 10, 2025
c3ca44e
Fix bug with web requests suppression
knguyen1 Sep 10, 2025
325bbc4
Fix some inconsistencies with `last_session_path`
knguyen1 Sep 10, 2025
847bd33
Apply zas code review recs 20250910
knguyen1 Sep 10, 2025
1bee982
Merge master into feat/PICARD-3118/add-save-session-feature
knguyen1 Sep 22, 2025
14e952b
Apply zas code review 20250924
knguyen1 Sep 25, 2025
31d7bc3
Rename `dont_write_tags` -> `enable_tag_saving`
knguyen1 Sep 25, 2025
499c052
Make `_atomic_write` its own utility
knguyen1 Sep 25, 2025
8eef846
Apply zas code review 20250925
knguyen1 Sep 25, 2025
cd61cb8
Improve type hints
knguyen1 Sep 26, 2025
9479f39
Make `restore_options` more generic
knguyen1 Sep 28, 2025
7e7654b
Fix: `dir` -> `directory`
knguyen1 Sep 28, 2025
3ebd96b
refactor: `session_loader` more readable
knguyen1 Sep 28, 2025
1c189b0
Refactor: Centralize RESTORABLE_CONFIG_KEYS for session management
knguyen1 Sep 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions picard/session/session_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
from picard.session.track_mover import TrackMover


# Configuration keys that can be restored from session files
RESTORABLE_CONFIG_KEYS = ['rename_files', 'move_files', 'enable_tag_saving']


class ProgressReporter(Protocol):
"""Protocol for emitting session loading progress updates."""

Expand Down Expand Up @@ -164,12 +168,8 @@ def restore_options(self, options: dict[str, Any]) -> None:
Options mapping from the session file.
"""
config = get_config()
config.setting['rename_files'] = bool(options.get('rename_files', config.setting['rename_files']))
config.setting['move_files'] = bool(options.get('move_files', config.setting['move_files']))
# Only support new key moving forward
config.setting['enable_tag_saving'] = bool(
options.get('enable_tag_saving', config.setting['enable_tag_saving'])
)
for key in RESTORABLE_CONFIG_KEYS:
config.setting[key] = options.get(key, config.setting[key])


class ItemGrouper:
Expand Down
Loading