Example #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="medium"></param>
        /// <param name="spPlaylist"></param>
        public Playlist(SpotiFire.Playlist spPlaylist, Medium medium)
            : base(spPlaylist.Name, medium)
        {
            var link = spPlaylist.GetLink();
            this.AltId = link.ToString();
            link.Dispose();

            this.Master = medium.MasterContainer;
        }
Example #2
0
 /// <summary>
 /// Updates the track with the properties of the given Spotify track
 /// </summary>
 /// <param name="spTrack">The Spotify track to update to</param>
 public void Update(SpotiFire.Track spTrack)
 {
     this.Title = spTrack.Name;
     this.Artist = spTrack.FirstArtist();
     this.Album = spTrack.Album.Name;
     this.AlbumArtist = spTrack.Album.Artist.Name;
     this.DiscNumber = (uint)spTrack.Disc;
     this.TrackNumber = (uint)spTrack.Index;
     this.Duration = spTrack.Duration;
     this.AltId = spTrack.GetLink().ToString();
 }
 /// <summary>
 /// Gets the Touchee Playlist corresponding to eht given SpotiFire playlist
 /// </summary>
 /// <param name="playlist">The SpotiFire playlist to look for</param>
 /// <returns>The corresponding Touchee playlist, or null of none is found</returns>
 Spotify.Media.Playlist GetToucheePlaylist(SpotiFire.Playlist playlist) {
     return playlist.Type == PlaylistType.Playlist
         ? Spotify.Media.Playlist.FindOrDefaultByAltID<Spotify.Media.Playlist>(playlist.GetLink().ToString())
         : null;
 }