Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138)
* Call Last.FM's getInfo again without mbid when artist is not found * Call Last.FM's getSimilar again without mbid when artist is not found * Call Last.FM's getTopTracks again without mbid when artist is not found
This commit is contained in:
@@ -4,6 +4,8 @@ type Response struct {
|
||||
Artist Artist `json:"artist"`
|
||||
SimilarArtists SimilarArtists `json:"similarartists"`
|
||||
TopTracks TopTracks `json:"toptracks"`
|
||||
Error int `json:"error"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type Artist struct {
|
||||
@@ -25,6 +27,11 @@ type Artist struct {
|
||||
|
||||
type SimilarArtists struct {
|
||||
Artists []Artist `json:"artist"`
|
||||
Attr Attr `json:"@attr"`
|
||||
}
|
||||
|
||||
type Attr struct {
|
||||
Artist string `json:"artist"`
|
||||
}
|
||||
|
||||
type ArtistImage struct {
|
||||
@@ -50,9 +57,5 @@ type Track struct {
|
||||
|
||||
type TopTracks struct {
|
||||
Track []Track `json:"track"`
|
||||
}
|
||||
|
||||
type Error struct {
|
||||
Code int `json:"error"`
|
||||
Message string `json:"message"`
|
||||
Attr Attr `json:"@attr"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user