public Task <IEnumerable <ITrack> > GetAlbumTracks(IAlbum album, CancellationToken cancellationToken, uint start = 0, uint count = 50) { album.ThrowIfNull(); if (album is Album albumImpl) { bool hasTracklist = albumImpl.TracklistInternal != null; bool tracklistPopulated = hasTracklist && albumImpl.TracklistInternal.Any(); if (hasTracklist && tracklistPopulated) { return(Task.FromResult <IEnumerable <ITrack> >(albumImpl.TracklistInternal.Skip((int)start) .Take((int)count) .ToList())); } } return(GetAlbumTracks(album.Id, cancellationToken, start, count)); }
public Task <IEnumerable <IComment> > GetAlbumComments(IAlbum album, CancellationToken cancellationToken, uint start = 0, uint count = 10) { album.ThrowIfNull(); return(GetAlbumComments(album.Id, cancellationToken, start, count)); }
public Task <bool> RateAlbum(IAlbum album, DeezerRating rating, CancellationToken cancellationToken) { album.ThrowIfNull(); return(RateAlbum(album.Id, rating, cancellationToken)); }
public Task <ulong> AddComment(IAlbum album, string commentText, CancellationToken cancellationToken) { album.ThrowIfNull(); return(AddComment(album.Id, commentText, cancellationToken)); }
public Task <bool> UnfavouriteAlbum(IAlbum album, CancellationToken cancellationToken) { album.ThrowIfNull(); return(UnfavouriteAlbum(album.Id, cancellationToken)); }