Migrate to yandex-music-api-go v0.0.0-20261018120746-dbf9a46bb2e7
Library now provides GetTrackDownloadURL (signed URL via XML download_info_url), so ym-dl delegates to it instead of reimplementing XML parsing and MD5 signing. Removed local DownloadTrackXML/DownloadInfoXML and unused crypto/md5, encoding/hex, encoding/xml, io imports from client.go. Track.Lyrics replaced by LyricsInfo (availability flags only, no text). Lyrics text requires separate GetTrackLyrics + GetTrackLyricsText calls — not implemented yet, lyrics field left empty.
This commit is contained in:
1 parent
d7692875db
commit
923705c7fc
4 files changed
+11
-111
No files matched your search
@@ -584,9 +584,12 @@ func BuildTrackMetaFromYandex(track *yandexmusic.Track, album *yandexmusic.Album
|
||||
}
|
||||
|
||||
// Lyrics
|
||||
// Note: track.LyricsInfo only contains availability flags, not the text.
|
||||
// To fetch full lyrics text, call yandexClient.GetTrackLyrics + GetTrackLyricsText separately.
|
||||
var lyrics string
|
||||
if track.Lyrics != nil && track.Lyrics.HasText {
|
||||
lyrics = track.Lyrics.Text
|
||||
if track.LyricsInfo != nil && track.LyricsInfo.HasAvailableTextLyrics {
|
||||
// Lyrics text available but not fetched here — requires separate API call
|
||||
lyrics = ""
|
||||
}
|
||||
|
||||
return TrackMeta{
|
||||
|
||||
Reference in new issue
Block a user