mirror of
https://github.com/zhaarey/apple-music-downloader.git
synced 2025-10-23 15:11:05 +00:00
fix: mv tag panic,artist cover miss
This commit is contained in:
@@ -38,7 +38,13 @@ func (t *Track) GetAlbumData(token string) error {
|
||||
return err
|
||||
}
|
||||
t.AlbumData = resp.Data[0]
|
||||
//len := len(resp.Data[0].Relationships.Tracks.Data)
|
||||
//t.DiscTotal = resp.Data[0].Relationships.Tracks.Data[len-1].Attributes.DiscNumber
|
||||
//尝试获取该track所在album的disk总数
|
||||
if len(resp.Data) > 0 {
|
||||
len := len(resp.Data[0].Relationships.Tracks.Data)
|
||||
if len > 0 {
|
||||
t.DiscTotal = resp.Data[0].Relationships.Tracks.Data[len-1].Attributes.DiscNumber
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user