private async Task <LfmTrack> GetTrackGetInfo(LfmUser lfmUser, LfmTrack lfmTrack, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); var response = await _lastfmApi.TrackGetInfo(lfmUser, lfmTrack, cancellationToken).ConfigureAwait(false); return(response?.track); }
public async Task <TrackGetInfoResponse> TrackGetInfo(LfmUser user, LfmTrack track, CancellationToken cancellationToken) { var request = new TrackGetInfoRequest { mbid = track.mbid, username = user.Username, track = track.name, artist = track.artist?.name, method = PluginConst.Methods.Track.GetInfo }; return(await Get <TrackGetInfoRequest, TrackGetInfoResponse>(request, cancellationToken)); }