public async Task MoveToNextSongAsync() { if (SongArchive.Count >= MaxSongs) { SongArchive.RemoveAt(0); } SongArchive.Add(CurrentSong); CurrentSong = UpcomingSongs.First(); UpcomingSongs.RemoveAt(0); await AddRandomSongAsync().ConfigureAwait(false); }
public void MoveToNextSong() { // update archive if (SongArchive.Count >= MaxSongs) { SongArchive.RemoveAt(0); } SongArchive.Add(CurrentSong); // reassign current song (take first item from list of upcoming songs) CurrentSong = UpcomingSongs.First(); // update the list of upcoming songs UpcomingSongs.RemoveAt(0); AddRandomSong(); }
public void AddToArchive() => SongArchive.Add(CurrentSong);