Example #1
0
        private async void GetTracksButton_Click(object sender, EventArgs e)
        {
            ContentResponse response = await _client.BrowseAsync(MediaNamespace.music, ContentSource.Collection, ItemType.Tracks, maxItems : 100);

            _tracks = response.Tracks.Items;
            TrackListBox.Items.Clear();
            _tracks.ForEach(t => TrackListBox.Items.Add(t));
        }
Example #2
0
        public async Task GetPlaylistsAsync()
        {
            ContentResponse playlists = await _grooveClient.BrowseAsync(
                MediaNamespace.music,
                ContentSource.Collection,
                ItemType.Playlists);

            _errorViewModel.HandleGrooveApiError(playlists.Error);
            DisplayMusicContent(playlists);
        }
        private async void GetGroovePlaylists()
        {
            ContentResponse playlistResponse = await _client.BrowseAsync(MediaNamespace.music, ContentSource.Collection, ItemType.Playlists);

            if (playlistResponse.Playlists != null)
            {
                GroovePlaylistCheckListBox.Items.Clear();
                List <Playlist> playlists = playlistResponse.Playlists.Items.OrderBy(p => p.Name).ToList();
                playlists.ForEach(p => GroovePlaylistCheckListBox.Items.Add(p, false));
            }

            SyncButton.Enabled = true;
        }