Ejemplo n.º 1
0
        public void PlayPlaylistTrack(Guid playlistId, int position)
        {
            Playlist playlist = Playlist.GetById(playlistId);

            this.playlist = playlist;
            if (position != -1)
            {
                spotify.PlayerLoad(playlist.playlist.Tracks[position]);
            }
            playQueue.Feed = playlist.playlist.Tracks.Cast <ITrack>();
            if (position == -1)
            {
                spotify.PlayerLoad(playQueue.Dequeue());
            }
            if (position != -1)
            {
                playQueue.Index = position;
            }
            if (position != -1)
            {
                playQueue.Current = playlist.playlist.Tracks[position];
            }
            spotify.PlayerPlay();
            spotify_SongStarted(spotify, new EventArgs());
        }
Ejemplo n.º 2
0
        public IEnumerable <Track> GetPlaylistTracks(Guid id)
        {
            Playlist playlist = Playlist.GetById(id);

            return(playlist.playlist.Tracks.Select(t => new Track(t)).ToArray());
        }