mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Add missing RADIO_BROWSER default source
This commit is contained in:
@@ -1503,6 +1503,18 @@ func (ds *DataStore) getDefaultSources() []models.ConfiguredSource {
|
||||
CreatedOn: "2017-07-20T16:43:48.000+00:00",
|
||||
UpdatedOn: "2017-07-20T16:43:48.000+00:00",
|
||||
},
|
||||
{
|
||||
ID: "10005",
|
||||
DisplayName: "",
|
||||
SourceKeyType: constants.ProviderRadioBrowser,
|
||||
SourceKeyAccount: "",
|
||||
SourceProviderID: strconv.Itoa(constants.RadioBrowserProviderID),
|
||||
Type: "Audio",
|
||||
SecretType: "token",
|
||||
Status: "READY",
|
||||
CreatedOn: "2026-02-16T01:01:01.000+00:00",
|
||||
UpdatedOn: "2026-02-16T01:01:01.000+00:00",
|
||||
},
|
||||
}
|
||||
|
||||
for i := range sources {
|
||||
|
||||
@@ -65,8 +65,8 @@ func TestMargeCreateAccount(t *testing.T) {
|
||||
}
|
||||
|
||||
// Verify it has default sources
|
||||
if len(resp.Sources) != 4 {
|
||||
t.Errorf("Expected 4 default sources, got %d", len(resp.Sources))
|
||||
if len(resp.Sources) != 5 {
|
||||
t.Errorf("Expected 5 default sources, got %d", len(resp.Sources))
|
||||
} else {
|
||||
if resp.Sources[0].ID != "10001" {
|
||||
t.Errorf("Expected first source ID 10001, got %s", resp.Sources[0].ID)
|
||||
|
||||
@@ -638,7 +638,7 @@ func TestDefaultSources(t *testing.T) {
|
||||
t.Fatalf("Failed to get sources: %v", err)
|
||||
}
|
||||
|
||||
expectedCount := 4
|
||||
expectedCount := 5
|
||||
if len(sources) != expectedCount {
|
||||
t.Errorf("Expected %d sources, got %d", expectedCount, len(sources))
|
||||
}
|
||||
@@ -668,6 +668,11 @@ func TestDefaultSources(t *testing.T) {
|
||||
if s.SecretType != "token" {
|
||||
t.Errorf("Expected INTERNET_RADIO secretType token, got %s", s.SecretType)
|
||||
}
|
||||
case "RADIO_BROWSER":
|
||||
foundIR = true
|
||||
if s.SecretType != "token" {
|
||||
t.Errorf("Expected RADIO_BROWSER secretType token, got %s", s.SecretType)
|
||||
}
|
||||
case "AUX":
|
||||
foundAux = true
|
||||
if s.DisplayName != "AUX IN" {
|
||||
|
||||
Reference in New Issue
Block a user