mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
A power-cut on the speaker's NAND can leave a datastore file present but 0-byte (a not-yet-flushed atomicWriteFile write). The read paths now treat empty/0-byte/ unparseable Presets/Recents/Sources the same as missing: GetConfiguredSources serves the managed defaults (so /full self-heals instead of wiping the speaker), GetPresets/GetRecents return an empty list (no more HTTP 500 on the device-level endpoints), and HasConfiguredSources reports a 0-byte file as absent (so the create_default_sources health quick fix is offered again). Read-side resilience only; the write-side durability fix (fsync in atomicWriteFile) follows in a separate PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>