private void ExecuteQueueArtist(string artistName) { GetArtistTracksAsync(artistName) .ContinueWith(task => { if (task.Exception != null) { _logger.Log(task.Exception.ToString(), Category.Exception, Priority.Medium); } else { if (task.Result.Any()) { _radio.Queue(task.Result.ToTrackStream(artistName)); } else { _toastService.Show("Unable to find track for artist " + artistName); } } }); }
private void ExecuteQueueTopTrack(HotArtistModel artist) { GetTopTrackForArtistAsync(artist) .ContinueWith(task => { if (task.Result != null) { _radio.Queue(task.Result.ToTrackStream(task.Result.Name, "Top hot artists")); _toastService.Show(new ToastData { Message = "Queued " + task.Result.Name, Icon = AppIcons.Add }); } else { _toastService.Show("Unable to find track " + artist.HotSongTitle); } }); }