// GET: /Spotify/AddTrackToPlayList public ContentResult AddTrackToPlaylist( string id, string playlistId, string playlistName) { if (playlistId == null && Spotify.CurrentPlaylists.ContainsKey(playlistName)) { playlistId = Spotify.CurrentPlaylists[playlistName].Id; } if (playlistId == null) { playlistId = Spotify.AddPlayList(playlistName); } Spotify.AddTrackToPlayList(playlistId, id); return(this.Content("")); }
// GET: /Spotify/AddAlbumToPlayList public ContentResult AddAlbumToPlayList( string id, string playlistId, string playlistName) { if (playlistId == null && Spotify.CurrentPlaylists.ContainsKey(playlistName)) { playlistId = Spotify.CurrentPlaylists[playlistName].Id; } if (playlistId == null && !string.IsNullOrEmpty(playlistName)) { playlistId = Spotify.AddPlayList(playlistName); } if (playlistId != null) { Spotify.AddAlbumToPlayList(playlistId, id); } return(this.Content("")); }