public void SwitchToPlaylist(Playlist p) { // TODO: If the new playlist contains the current track, continue playing it. Utils.Log("Changing playlist to " + p.name); CurrentPlaylist = p; p.trackIndex = 0; if (p.shuffle) { p.Shuffle(); } if (p.tracks.Count > 0) { PlayClip(p.tracks[p.trackIndex]); } else { Utils.Log("Playlist was empty: " + p.name); } }
public void SwitchToPlaylist(Playlist p) { // TODO: If the new playlist contains the current track, continue playing it. Utils.Log("Changing playlist to " + p.name); CurrentPlaylist = p; p.trackIndex = 0; if (p.shuffle) p.Shuffle(); if (p.tracks.Count > 0) PlayClip(p.tracks[p.trackIndex]); else Utils.Log("Playlist was empty: " + p.name); }