mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Refactors telnetURLConfigCommands into a telnetURLs value type with explicit per-field URLs (Marge, Stats, SwUpdate, BmxRegistry) and adds telnetURLsFromOptions to resolve those four URLs from a base targetURL plus optional per-field overrides via the migration options map (marge_url, stats_url, sw_update_url, bmx_url). Envswitch derivation rule: arg1 = u.Marge verbatim, arg2 = u.SwUpdate verbatim. The soundcork case (Marge has /marge appended) is handled without any branching — envswitch arg1 carries the same suffix and the parallel persistence layer stays consistent with the runtime layer on the next reboot. The default path is unchanged for users who only enter a base URL: all four fields share targetURL with the canonical /updates/soundtouch and /bmx/registry/v1/services suffixes. MigrateSpeaker plumbs the options map through so the existing handler's option dictionary works for telnet without UI changes; the UI can layer per-field input on top later. Existing telnet migration tests updated to call the new signature. TestMigrateViaTelnet_SoundcorkMargeSuffixPropagatesToEnvswitch is the load-bearing regression test for the derivation rule. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>