private void DownloadSingleMap()
 {
     if (SelectedMap != null)
     {
         Task.Run(() => BeatsaverAPI.DownloadMap(SelectedMap.Key, SelectedMap.Metadata.SongName, SelectedMap.Metadata.LevelAuthorName));
     }
 }
        private void MatchPlaylist()
        {
            MatchStatus = "Finding maps...";
            Task.Run(() =>
            {
                var matches = BeatsaverAPI.FindMapsPlaylist(SelectedPlaylist);
                foreach (var song in SelectedPlaylist.Songs)
                {
                    if (song.SongID != null) //TODO: handle local songs that don't have a spotify id
                    {
                        if (matches.ContainsKey(song.SongID))
                        {
                            song.MapMatches = matches[song.SongID];
                            Console.WriteLine(song.MapMatches.Count);
                        }
                    }
                }

                if (matches.Count > 0)
                {
                    MatchStatus = "Maps found!";
                }
                else
                {
                    MatchStatus = "No maps found";
                }
            });
        }
 private void Initialize()
 {
     Task.Run(() => {
         SpotifyAPI.Start();
     });
     Task.Run(() => {
         BeatsaverAPI.Start();
     });
 }
 private void MatchSingleSong()
 {
     MatchStatus = "Finding maps...";
     Task.Run(() =>
     {
         SelectedSong.MapMatches = BeatsaverAPI.FindMapsSingleSong(SelectedSong);
         if (SelectedSong.MapMatches.Count > 0)
         {
             MatchStatus = "Maps found!";
         }
         else
         {
             MatchStatus = "No maps found";
         }
     });
 }
 private void DownloadPlaylistMatches()
 {
     Task.Run(() => BeatsaverAPI.DownloadMaps(SelectedPlaylist));
 }