public void UpdatePlaylist(SCPlaylist playlist)
        {
            if(playlist.Id != playlistId)
            {
                throw new SoundCloudApiException(string.Format("Context set for playlistId = {0}. Create new context for update another playlist.", playlistId));
            }

            var currentPlaylist = GetInternalPlaylist();

            var diff = currentPlaylist.GetDiff(playlistConverter.Convert(playlist));

            var diffo = new Dictionary<string, object>();
            diffo.Add("playlist", diff);
            soundCloudRawClient.Request(prefix, string.Empty, HttpMethod.Put, diffo);
        }
        public Playlist Convert(SCPlaylist playlist)
        {
            if (playlist == null)
            {
                return null;
            }

            return new Playlist
            {
                Id = playlist.Id,
                CreatedAt = dateTimeConverter.Convert(playlist.CreatedAt),
                UserId = playlist.UserId,
                User = userConverter.Convert(playlist.User),
                Title = playlist.Title,
                Permalink = playlist.Permalink,
                PermalinkUrl = playlist.PermalinkUrl,
                Uri = playlist.Uri,
                Sharing = playlist.Sharing.GetParameterName(),
                EmbeddableBy = playlist.EmbeddableBy.GetParameterName(),
                PurchaseUrl = playlist.PurchaseUrl,
                ArtworkUrl = playlist.Artwork == null? null : playlist.Artwork.Url(),
                Description = playlist.Description,
                Label = userConverter.Convert(playlist.Label),
                LabelId = playlist.LabelId,
                LabelName = playlist.LabelName,
                Duration = (int)playlist.Duration.TotalMilliseconds,
                Genre = playlist.Genre,
                TagList = tagListConverter.Convert(playlist.TagList),
                Release = playlist.Release,
                ReleaseYear = playlist.ReleaseDate.SafeGet<DateTimeOffset, int>(x => x.Year),
                ReleaseMonth = playlist.ReleaseDate.SafeGet<DateTimeOffset, int>(x => x.Month),
                ReleaseDay = playlist.ReleaseDate.SafeGet<DateTimeOffset, int>(x => x.Day),
                Streamabale = playlist.Streamabale,
                Downloadable = playlist.Downloadable,
                Ean = playlist.Ean,
                PlaylistType = playlist.PlaylistType.GetParameterName(),
                License = playlist.License.GetParameterName(),
                Tracks = playlist.Tracks.Select(trackConverter.Convert).ToArray(),
                Type = playlist.Type.GetParameterName()
            };
        }