The first public release of Fabled Minstrel #158

Merged
bvandeusen merged 256 commits from dev into main 2026-12-03 21:41:58 -05:00
Showing only changes of commit da64d95264 - Show all commits
+8 -2
View File
@@ -251,9 +251,15 @@ func TestGetRandomSongs_NarrowsByGenreAndYear(t *testing.T) {
func (f picksFixture) similar(t *testing.T, method func(http.ResponseWriter, *http.Request), key, id string) ([]string, int) { func (f picksFixture) similar(t *testing.T, method func(http.ResponseWriter, *http.Request), key, id string) ([]string, int) {
t.Helper() t.Helper()
var got map[string]SimilarSongsContainer var got struct {
SimilarSongs SimilarSongsContainer `json:"similarSongs"`
SimilarSongs2 SimilarSongsContainer `json:"similarSongs2"`
}
code := call(t, method, f.user, "count=10&id="+id, &got) code := call(t, method, f.user, "count=10&id="+id, &got)
return titles(got[key].Songs), code if key == "similarSongs2" {
return titles(got.SimilarSongs2.Songs), code
}
return titles(got.SimilarSongs.Songs), code
} }
// Radio from a song, an album or an artist: every pick is playable, and the // Radio from a song, an album or an artist: every pick is playable, and the