示例#1
0
        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();
        }
示例#2
0
 private string getSongUrl(Song song)
 {
     return(Source.getDownloadUrl(song));
 }