2023年6月16日16:37:48
parent
2abdf60f37
commit
c17148d199
|
|
@ -102,7 +102,7 @@ public class MusicDownloadController {
|
|||
@FXML
|
||||
public TextField name;
|
||||
|
||||
private final SimpleIntegerProperty index = new SimpleIntegerProperty(0);
|
||||
private static final SimpleIntegerProperty index = new SimpleIntegerProperty(0);
|
||||
|
||||
public static final String ku_wo_vip_api = "http://www.kuwo.cn/api/www/search/searchMusicBykeyWord?pn=1&rn=30&httpsStatus=1&reqId=a3d144b0-9570-11ed-9918-83c8c32b357d&key=";
|
||||
|
||||
|
|
@ -404,6 +404,7 @@ public class MusicDownloadController {
|
|||
songInfo.setArtist(song.getArtists().get(0).getName());
|
||||
songInfo.setAlbum(song.getAlbum().getName());
|
||||
songInfo.setId(id);
|
||||
songInfo.setMp3Url(song.getMp3Url());
|
||||
list.add(songInfo);
|
||||
id++;
|
||||
}
|
||||
|
|
@ -414,9 +415,19 @@ public class MusicDownloadController {
|
|||
|
||||
|
||||
public static void set_songInfo(SongInfo listBean) {
|
||||
String url = null;
|
||||
//判断音乐类型
|
||||
switch (index.get()){
|
||||
case 0://网易云
|
||||
url = listBean.getMp3Url();
|
||||
break;
|
||||
case 3://酷我
|
||||
String req_id = data_bean.getValue().getReqId();
|
||||
int mid = listBean.getRid();
|
||||
String url = download_url + "&reqId=" + req_id + "&mid=" + mid;
|
||||
url = download_url + "&reqId=" + req_id + "&mid=" + mid;
|
||||
break;
|
||||
}
|
||||
|
||||
if (restTemplate == null) {
|
||||
restTemplate = new RestTemplate();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,4 +73,5 @@ public class SongInfo {
|
|||
private PayInfo payInfo;
|
||||
private String tme_musician_adtype;
|
||||
private int id;
|
||||
private String mp3Url;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue