Correct the version and make the config merge deeply

The package version had been left at the scaffolded 0.1.0 while the released
tag was v5.4.0. Nothing in the code chose 0.1.0 -- it was npm-init's equivalent,
never updated -- and it made every version comparison meaningless: the window
title, the About dialog and the update check all read it.

ConfigManager merged a stored config over the defaults with dict.update(),
which is shallow. A config written by an older build carries partial "player"
and "feed" objects, and a shallow update replaces the whole nested default with
the partial one, so keys added since came back missing. The `or 15` and
`or "auto"` fallbacks at the call sites were load-bearing because of it. The
merge is now recursive, and keys present only in the stored file are kept so a
downgrade cannot destroy settings.

Configs now carry a config_version. A file written before 5.4.0 -- including
one inherited from an upstream YTSage install -- has its stored
check_app_updates cleared once, because that setting used to point at PyPI's
`ytsage` package and oop7/YTSage's releases, neither of which is this program.

The settings tab read a missing check_app_updates as enabled and persisted that
reading on OK, so merely opening Custom Options turned the checker back on.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-09 00:31:56 +02:00
parent b3772ff484
commit 089b144626
5 changed files with 105 additions and 9 deletions
+25
View File
@@ -10,6 +10,31 @@ records.
## Unreleased
### Fixed
- **The app no longer offers upstream YTSage's releases as its own updates.**
`__version__` and `pyproject.toml` had been left at the scaffolded `0.1.0`
while the released tag was `v5.4.0`, so every comparison against upstream's
published version reported an update. Both now read `5.4.0`, the single
source of truth for the window title, the About dialog and the update check.
- `ConfigManager` merged a stored config over the defaults **shallowly**, so a
file written by an older build replaced whole nested objects: a stored
`"player"` or `"feed"` containing only some keys silently discarded every
default added since. The merge is now recursive. Keys present only in the
stored file are preserved, so downgrading cannot destroy settings.
- Opening *Custom Options* and clicking OK re-enabled the update checker, because
the settings tab read a missing `check_app_updates` as enabled and then
persisted that reading unconditionally.
### Changed
- Configs now carry `config_version`. A file written before 5.4.0 — including one
inherited from an upstream YTSage install — has its stored `check_app_updates`
cleared once, so SageTube's own default applies rather than a setting that
pointed at another project's releases.
## 5.4.0 — 2026-08-08
### Changed
- The documentation left the repository: `docs/BUILDING.md`, `docs/UPSTREAM.md`