Exemple #1
0
        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);
        }
Exemple #2
0
        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));
        }