public void Download() { WebClient client = new WebClient(); client.DownloadProgressChanged += Client_DownloadProgressChanged; new Thread(() => { foreach (var item in song.items)// 多来源,避免单个来源出错 { try { client.DownloadFile(musicSources.getDownloadUrl(item), target + "\\" + item.getFileName()); DownloadFinish?.Invoke(this, this); break; } catch { } } }).Start(); }
private string getSongUrl(Song song) { return(Source.getDownloadUrl(song)); }