add: MV tags

This commit is contained in:
itouakirai
2025-02-12 08:00:09 +08:00
parent f7fcf41b13
commit 591049cedc
3 changed files with 112 additions and 32 deletions

View File

@@ -355,7 +355,10 @@ func ExtMvData (keyAndUrls string, savePath string)(error) {
fmt.Printf("下载链接 %s 失败:%v\n", url, err)
return err
}
if resp.StatusCode != http.StatusOK {
fmt.Printf("链接 %s 响应失败:%v\n", url, resp.Status)
return errors.New(resp.Status)
}
// 将响应体写入输出文件
_, err = io.Copy(barWriter, resp.Body)
defer resp.Body.Close() // 注意及时关闭响应体,避免资源泄露

View File

@@ -437,11 +437,15 @@ type AutoGeneratedMusicVideo struct {
TextColor3 string `json:"textColor3"`
TextColor4 string `json:"textColor4"`
} `json:"artwork"`
AlbumName string `json:"albumName"`
ArtistName string `json:"artistName"`
URL string `json:"url"`
GenreNames []string `json:"genreNames"`
DurationInMillis int `json:"durationInMillis"`
Isrc string `json:"isrc"`
TrackNumber int `json:"trackNumber"`
DiscNumber int `json:"discNumber"`
ContentRating string `json:"contentRating"`
ReleaseDate string `json:"releaseDate"`
Name string `json:"name"`
Has4K bool `json:"has4K"`