perf(S01/T02): Add MusicBrainz search/lookup/browse client, ListenBrain…
- backend/explore/types.go - backend/explore/musicbrainz.go - backend/explore/listenbrainz.go - backend/explore/coverart.go - backend/explore/coverart_test.go
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package explore
|
||||
|
||||
import "fmt"
|
||||
|
||||
const coverArtBaseURL = "https://coverartarchive.org/release"
|
||||
|
||||
// CoverArtURL returns the Cover Art Archive URL for the 250px
|
||||
// front cover of the given release MBID.
|
||||
func CoverArtURL(releaseMBID string) string {
|
||||
return fmt.Sprintf("%s/%s/front-250", coverArtBaseURL, releaseMBID)
|
||||
}
|
||||
|
||||
// CoverArtURLSize returns the Cover Art Archive URL for the front
|
||||
// cover of the given release MBID at the specified pixel size.
|
||||
// Common sizes are 250, 500, and 1200.
|
||||
func CoverArtURLSize(releaseMBID string, size int) string {
|
||||
return fmt.Sprintf("%s/%s/front-%d", coverArtBaseURL, releaseMBID, size)
|
||||
}
|
||||
Reference in New Issue
Block a user