private static void playlist_OnTracksAdded(object sender, Spotify.PlaylistTracksAddedEventArgs e) { Spotify.Playlist playlist = (Spotify.Playlist)sender; if (!playlist.IsClone(_jukeboxList)) { return; } TryJukeboxStart(); }
private static void playlist_OnTracksMoved(object sender, Spotify.PlaylistTracksMovedEventArgs e) { Spotify.Playlist playlist = (Spotify.Playlist)sender; if (!playlist.IsClone(_jukeboxList)) { return; } Console.WriteLine("jukebox: {0} tracks were moved", e.Tracks.Count); TryJukeboxStart(); }
private static void playlist_OnTracksRemoved(object sender, Spotify.PlaylistTracksRemovedEventArgs e) { Spotify.Playlist playlist = (Spotify.Playlist)sender; if (!playlist.IsClone(_jukeboxList)) { return; } int k = 0; for (int i = 0; i < e.Tracks.Count; ++i) { if (e.Tracks[i] < _trackIndex) { ++k; } } _trackIndex = k; TryJukeboxStart(); }