示例#1
0
 // 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(""));
 }