add: station dl(need media-user-token)

This commit is contained in:
itouakirai
2025-03-03 08:52:26 +08:00
parent 21728cabb6
commit acb5a7ce1e
4 changed files with 142 additions and 12 deletions

View File

@@ -50,10 +50,10 @@ func (a *Station) GetResp(mutoken, token, l string) error {
a.Resp = *resp
//简化高频调用名称
a.Type = a.Resp.Data[0].Attributes.PlayParams.Format
if a.Type != "tracks" {
return errors.New("stream类型暂未开发")
}
a.Name = a.Resp.Data[0].Attributes.Name
if a.Type != "tracks" {
return nil
}
tracksResp, err := ampapi.GetStationNextTracks(a.ID, mutoken, a.Language, token)
if err != nil {
return errors.New("error getting station tracks response")