🐛 Add missing artists to mb data

This commit is contained in:
Dan Jones 2023-09-23 17:17:27 -05:00
commit dac33a7688

View file

@ -11,11 +11,18 @@ import (
type MbRecording struct {
Id string
Isrcs []string
FirstReleaseDate string `json:"first-release-date"`
Length int
Title string
Video bool
Releases []MbRelease
Genres []MbGenre
}
type MbGenre struct {
Id string
Name string
}
type MbRelease struct {
@ -25,10 +32,26 @@ type MbRelease struct {
Media []MbMedia
Status string
StatusId string `json:"status-id"`
ArtistCredit []MbArtistCredit `json:"artist-credit"`
Title string
Genres []MbGenre
// ReleaseEvents []MbReleaseEvent `json:"release-events"`
}
type MbArtistCredit struct {
Name string
Artist MbArtist
}
type MbArtist struct {
Id string
Name string
TypeId string `json:"type-id"`
Type string
SortName string `json:"sort-name"`
Genres []MbGenre
}
type MbMedia struct {
FormatId string `json:"format-id"`
Position int
@ -60,7 +83,7 @@ func FillMbRecording(rec *MbRecording) error {
}
q := req.URL.Query()
q.Add("fmt", "json")
q.Add("inc", "releases+media")
q.Add("inc", "releases+media+artist-credits+isrcs+genres")
req.URL.RawQuery = q.Encode()
req.Header.Set("User-Agent", config.UserAgent)