public void AddPlaylistToSpotify(PlaylistObject playlist) { var trackUris = new List <string>(); foreach (var guid in playlist.Albums) { IAlbum album = (IAlbum)GetMusicObject(guid); if (album is SpotifyAlbum) { List <SpotifyTrack> trackList = GetTracks(album).Cast <SpotifyTrack>().ToList(); foreach (var track in trackList) { trackUris.Add(track.SpotifyID); } } } FullPlaylist newPlaylist = SpotifyApi.CreatePlaylist(playlist.Name, _settings.Creds.SpotifyUser, _spotifyAuth); SpotifyApi.AddPlaylistTracks(trackUris, newPlaylist, _spotifyAuth); }
public void AddPlaylist(PlaylistObject playlist) { _playlist.Add(playlist); }
public void RemovePlaylist(PlaylistObject playlist) { _playlist.Remove(playlist); }
public void Add(PlaylistObject playlist) { _playlists.Add(playlist); }