Fails to read some playlists

Jan 7, 2015 at 1:55 PM
First thanks for a great and lightweight library. I like the condensed and simple api you've written.

I'm successfully fetching public user playlists, but in some cases it fails.

For example I can't read this list from Spotify with the SpotifyWebAPI.Playlist.GetPlaylist(userId, playlistId, authToken); method.

And if you run the request here it succeeds:

Do you have any ideas?

Thanks in advance,
Jan 7, 2015 at 2:30 PM
Hi ollebulle,

Thanks for your interest in the project. My initial thought is that the playlist model has changed and the conversion between the retrieved JSON object no longer matches the model I created in the library.

I'm at work right now but I may be able to take a look tonight.


Jan 21, 2015 at 6:29 PM
I only have GIT installed right now but here are the fix:
(Null check on added_by)


namespace SpotifyWebAPI.SpotifyModel
internal class playlisttrack
    public string added_at { get; set; }
    public user added_by { get; set; }
    public track track { get; set; }

    public PlaylistTrack ToPOCO()
        PlaylistTrack pt = new PlaylistTrack();
        DateTime addedAt;
        if (DateTime.TryParse(this.added_at, out addedAt))
            pt.AddedAt = addedAt;
            pt.AddedAt = DateTime.Now;
    if(this.added_by != null)
    pt.AddedBy = this.added_by.ToPOCO();
        pt.Track = this.track.ToPOCO();

        return pt;
Feb 2, 2015 at 6:29 PM
I've committed your change! thanks for supporting the project!