feat(S02/T01): Added CoverArtGroupURL for release-group cover art, conc…

- backend/explore/coverart.go
- backend/explore/explore.go
- backend/explore/coverart_test.go
- frontend/wailsjs/go/explore/Service.js
- frontend/wailsjs/go/explore/Service.d.ts
This commit is contained in:
2026-03-23 17:31:01 -04:00
parent 1ff53d8084
commit 677ed01d89
5 changed files with 316 additions and 1 deletions
+45
View File
@@ -50,3 +50,48 @@ func TestCoverArtURLSize(t *testing.T) {
}
}
}
func TestCoverArtGroupURL(t *testing.T) {
t.Parallel()
mbid := "abc-123"
got := explore.CoverArtGroupURL(mbid)
want := "https://coverartarchive.org/release-group/abc-123/front-250"
if got != want {
t.Errorf("CoverArtGroupURL(%q) = %q, want %q", mbid, got, want)
}
}
func TestCoverArtGroupURLSize(t *testing.T) {
t.Parallel()
mbid := "abc-123"
tests := []struct {
size int
want string
}{
{
250,
"https://coverartarchive.org/release-group/abc-123/front-250",
},
{
500,
"https://coverartarchive.org/release-group/abc-123/front-500",
},
{
1200,
"https://coverartarchive.org/release-group/abc-123/front-1200",
},
}
for _, tt := range tests {
got := explore.CoverArtGroupURLSize(mbid, tt.size)
if got != tt.want {
t.Errorf("CoverArtGroupURLSize(%q, %d) = %q, want %q",
mbid, tt.size, got, tt.want)
}
}
}