示例#1
0
        private async void DownloadSong(string id, int position)
        {
            NetEase netEase = new NetEase();
            Song    song    = await netEase.GetSong(id);

            downloader.DownloadMp3(song.Url, song.Artist, song.Title, position);
        }
示例#2
0
        private async void GetSong(string id)
        {
            var progress = new ProgressDialog(context);

            progress.Indeterminate = true;
            progress.SetProgressStyle(ProgressDialogStyle.Spinner);
            progress.SetMessage("Searching. Please wait...");
            progress.SetCancelable(false);
            progress.Show();
            NetEase netEase = new NetEase();
            Song    song    = await netEase.GetSong(id);

            Container.Player.Reset();
            Container.Player.SetDataSource(song.Url);
            Container.Player.Prepare();
            Container.Player.Start();
            progress.Hide();
        }