コード例 #1
0
ファイル: Program.cs プロジェクト: gladish/Spotify.NET
        private static void playlist_OnTracksAdded(object sender, Spotify.PlaylistTracksAddedEventArgs e)
        {
            Spotify.Playlist playlist = (Spotify.Playlist)sender;
            if (!playlist.IsClone(_jukeboxList))
            {
                return;
            }

            TryJukeboxStart();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: gladish/Spotify.NET
        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();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: gladish/Spotify.NET
        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();
        }