private async void SyncToGroove() { List <Playlist> groovePlaylists = GroovePlaylistCheckListBox.Items.Cast <Playlist>().ToList(); List <MusicBeePlaylist> playlistsToSync = LocalPlaylistCheckListBox.CheckedItems.Cast <MusicBeePlaylist>().ToList(); this._syncProgressWindow = new SyncProgressWindow(_client, _mbApiInterface, SyncDirection.LocalToGroove, playlistsToSync, groovePlaylists); var dialogResult = this._syncProgressWindow.ShowDialog(); if (dialogResult == DialogResult.OK) { WriteOutputLine("Sync completed successfully!"); GetGroovePlaylists(); } else if (dialogResult == DialogResult.No) { foreach (PlaylistActionResponse response in _syncProgressWindow.ErrorResponses) { WriteOutputLine($"Failed to sync '{response.PlaylistActionResult.Name}' with error '{response.Error.Description}'"); } } else { WriteOutputLine("Something went wrong..."); } }
public SyncHelper(IGrooveClient client, MusicBeeApiInterface mbApiInterface, SyncProgressWindow window) { _client = client; _window = window; _mbApiInterface = mbApiInterface; }