return possible error

This commit is contained in:
aynakeya
2024-05-07 19:40:11 +08:00
parent 4b54a301c9
commit 4e77cdfd0e

View File

@@ -118,6 +118,9 @@ func (n *Netease) GetMediaUrl(meta miaosic.MetaData, quality miaosic.Quality) ([
n.ReqData,
neteaseApi.SongURLConfig{Ids: []int{cast.ToInt(meta.Identifier)}})
if err != nil || result.Code != 200 {
if err != nil {
return nil, err
}
return nil, miaosic.ErrorExternalApi
}
if len(result.Data) == 0 {