mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
When a preset on disk referenced a source no longer in the configured- sources list, mapPresetsToFullResponse appended it with an empty <source/> block. The speaker decodes /full as protobuf and treats the inner source fields (id, type, sourceproviderid, credential) as required, so the malformed block aborted the whole account sync and wiped the speaker's locally stored presets — the GH-269 symptom of "/presets empty within seconds of AfterTouch coming online". For well-known radio providers (TuneIn, InternetRadio, LocalInternetRadio, RadioBrowser) the preset now gets a synthesised source block built from canonical defaults; account-bound providers (Spotify, Amazon) are skipped with a log line so other presets in the response survive the sync. Also folds RADIO_BROWSER into resolveSourceName's fallback switch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>