Update yandex-music-api-go and fix Artist.ID JSONID conversion
CI/CD / test (push) Successful in 47s
CI/CD / build (push) Successful in 1m0s
CI/CD / docker (push) Successful in 2m36s

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:
Mrixs committed 2026-10-18 11:14:39 +03:00
1 parent 4e6bef40e3
commit 5dcdd92d40
3 files changed
+7 -5

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ module ym-dl
go 1.27.2 go 1.27.2
require ( require (
gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018072517-d0173f795d2a gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018080126-dbb823ade349
github.com/bogem/id3v2 v1.2.0 github.com/bogem/id3v2 v1.2.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
modernc.org/sqlite v1.60.1 modernc.org/sqlite v1.60.1
+2
View File
@@ -4,6 +4,8 @@ gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018055743-0456ca0665a6 h1:3
gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018055743-0456ca0665a6/go.mod h1:L+GcqPRZiu0Srq6+YxfdLztltXV8DcxKjNUOXWJvR9o= gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018055743-0456ca0665a6/go.mod h1:L+GcqPRZiu0Srq6+YxfdLztltXV8DcxKjNUOXWJvR9o=
gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018072517-d0173f795d2a h1:y+XHpnxtn2xiXx735itwB83X82dOPfwbzCqZ5/WlBs4= gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018072517-d0173f795d2a h1:y+XHpnxtn2xiXx735itwB83X82dOPfwbzCqZ5/WlBs4=
gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018072517-d0173f795d2a/go.mod h1:L+GcqPRZiu0Srq6+YxfdLztltXV8DcxKjNUOXWJvR9o= gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018072517-d0173f795d2a/go.mod h1:L+GcqPRZiu0Srq6+YxfdLztltXV8DcxKjNUOXWJvR9o=
gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018080126-dbb823ade349 h1:3Rru+kVwHrDZwO1AcJ6e/ia/O4XKt6A3Nux1WXmDBDE=
gitea.mrixs.me/Mrixs/yandex-music-api-go v0.0.0-20261018080126-dbb823ade349/go.mod h1:L+GcqPRZiu0Srq6+YxfdLztltXV8DcxKjNUOXWJvR9o=
github.com/bogem/id3v2 v1.2.0 h1:hKDF+F1gOgQ5r1QmBCEZUk4MveJbKxCeIDSBU7CQ4oI= github.com/bogem/id3v2 v1.2.0 h1:hKDF+F1gOgQ5r1QmBCEZUk4MveJbKxCeIDSBU7CQ4oI=
github.com/bogem/id3v2 v1.2.0/go.mod h1:t78PK5AQ56Q47kizpYiV6gtjj3jfxlz87oFpty8DYs8= github.com/bogem/id3v2 v1.2.0/go.mod h1:t78PK5AQ56Q47kizpYiV6gtjj3jfxlz87oFpty8DYs8=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
+4 -4
View File
@@ -553,17 +553,17 @@ func BuildTrackMetaFromYandex(track *yandexmusic.Track, album *yandexmusic.Album
artistID := "" artistID := ""
if len(track.Artists) > 0 { if len(track.Artists) > 0 {
artistID = track.Artists[0].ID artistID = string(track.Artists[0].ID)
} }
albumArtist := "" albumArtist := ""
albumArtistID := "" albumArtistID := ""
if album != nil && len(album.Artists) > 0 { if album != nil && len(album.Artists) > 0 {
albumArtist = album.Artists[0].Name 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 { } else if len(track.Albums) > 0 && len(track.Albums[0].Artists) > 0 {
albumArtist = track.Albums[0].Artists[0].Name 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 // Genre: prefer track genre, fallback to album genre
@@ -626,7 +626,7 @@ func BuildAlbumMetaFromYandex(album *yandexmusic.Album, tracks []TrackMeta) Albu
artistID := "" artistID := ""
if len(album.Artists) > 0 { if len(album.Artists) > 0 {
artistName = album.Artists[0].Name artistName = album.Artists[0].Name
artistID = album.Artists[0].ID artistID = string(album.Artists[0].ID)
} }
return AlbumMeta{ return AlbumMeta{