Update yandex-music-api-go and fix Artist.ID JSONID conversion
Library updated to v0.0.0-20261018080126-dbb823ade349 which fixes: - R128 field type changed from float64 to JSONR128 (accepts object or number) - Artist.ID type changed from string to JSONID (accepts number or string) Converted Artist.ID usages in storage.go to string() for assignments.
This commit is contained in:
1 parent
4e6bef40e3
commit
5dcdd92d40
3 files changed
+7
-5
No files matched your search
@@ -553,17 +553,17 @@ func BuildTrackMetaFromYandex(track *yandexmusic.Track, album *yandexmusic.Album
|
||||
|
||||
artistID := ""
|
||||
if len(track.Artists) > 0 {
|
||||
artistID = track.Artists[0].ID
|
||||
artistID = string(track.Artists[0].ID)
|
||||
}
|
||||
|
||||
albumArtist := ""
|
||||
albumArtistID := ""
|
||||
if album != nil && len(album.Artists) > 0 {
|
||||
albumArtist = album.Artists[0].Name
|
||||
albumArtistID = album.Artists[0].ID
|
||||
albumArtistID = string(album.Artists[0].ID)
|
||||
} else if len(track.Albums) > 0 && len(track.Albums[0].Artists) > 0 {
|
||||
albumArtist = track.Albums[0].Artists[0].Name
|
||||
albumArtistID = track.Albums[0].Artists[0].ID
|
||||
albumArtistID = string(track.Albums[0].Artists[0].ID)
|
||||
}
|
||||
|
||||
// Genre: prefer track genre, fallback to album genre
|
||||
@@ -626,7 +626,7 @@ func BuildAlbumMetaFromYandex(album *yandexmusic.Album, tracks []TrackMeta) Albu
|
||||
artistID := ""
|
||||
if len(album.Artists) > 0 {
|
||||
artistName = album.Artists[0].Name
|
||||
artistID = album.Artists[0].ID
|
||||
artistID = string(album.Artists[0].ID)
|
||||
}
|
||||
|
||||
return AlbumMeta{
|
||||
|
||||
Reference in new issue
Block a user