Fix migration to use the correct URL format (#165)

Fixes https://github.com/gesellix/Bose-SoundTouch/issues/161
This commit is contained in:
Tobias Gesellchen
2026-04-15 19:05:07 +02:00
committed by GitHub
parent 13b8e7be82
commit 76bb19ebcb
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -217,7 +217,7 @@ func (m *Manager) GetMigrationSummary(deviceIP, targetURL, proxyURL string, opti
// 1. Initial planned config
plannedCfg := PrivateCfg{
MargeServerUrl: fmt.Sprintf("%s/marge", targetURL),
MargeServerUrl: targetURL,
StatsServerUrl: targetURL,
SwUpdateUrl: fmt.Sprintf("%s/updates/soundtouch", targetURL),
UsePandoraProductionServer: true,
@@ -708,7 +708,7 @@ func (m *Manager) migrateViaXML(deviceIP, targetURL, proxyURL string, options ma
}
cfg := PrivateCfg{
MargeServerUrl: fmt.Sprintf("%s/marge", targetURL),
MargeServerUrl: targetURL,
StatsServerUrl: targetURL,
SwUpdateUrl: fmt.Sprintf("%s/updates/soundtouch", targetURL),
UsePandoraProductionServer: true,
+3 -3
View File
@@ -270,7 +270,7 @@ func TestGetMigrationSummary_WithProxyOptions(t *testing.T) {
}
// When SSH fails (which it will here), PlannedConfig should be the default one for target:8000
if !contains(summary.PlannedConfig, "http://target:8000/marge") {
if !contains(summary.PlannedConfig, "http://target:8000") {
t.Errorf("Expected default marge URL when SSH fails, got: %s", summary.PlannedConfig)
}
@@ -1418,7 +1418,7 @@ func TestCheckIsMigrated(t *testing.T) {
summary := &MigrationSummary{
SSHSuccess: true,
ParsedCurrentConfig: &PrivateCfg{
MargeServerUrl: "http://aftertouch:8000/marge",
MargeServerUrl: "http://aftertouch:8000",
},
}
m.checkIsMigrated(summary, "127.0.0.1")
@@ -1514,7 +1514,7 @@ func TestCheckIsMigrated(t *testing.T) {
summary := &MigrationSummary{
SSHSuccess: true,
ParsedCurrentConfig: &PrivateCfg{
MargeServerUrl: "http://streaming.bose.com/marge",
MargeServerUrl: "http://streaming.bose.com",
},
CACertTrusted: false,
}