private async void PlaybackService_PlaybackSuccess(bool isPlayingPreviousTrack) { if (this.SignInState == SignInState.SignedIn && this.isEnabled) { // As soon as a track starts playing, send a Now Playing request. this.trackStartTime = DateTime.Now; this.canScrobble = true; string artist = this.playbackService.PlayingTrack.ArtistName != Defaults.UnknownArtistString ? this.playbackService.PlayingTrack.ArtistName : string.Empty; string trackTitle = this.playbackService.PlayingTrack.TrackTitle; string albumTitle = this.playbackService.PlayingTrack.AlbumTitle != Defaults.UnknownAlbumString ? this.playbackService.PlayingTrack.AlbumTitle : string.Empty; if (!string.IsNullOrEmpty(artist) && !string.IsNullOrEmpty(trackTitle)) { bool isSuccess = await LastfmAPI.TrackUpdateNowPlaying( this.username, this.password, this.sessionKey, artist, trackTitle, albumTitle); if (isSuccess) { LogClient.Instance.Logger.Info("Successfully updated Now Playing for track '{0} - {1}'", artist, trackTitle); } else { LogClient.Instance.Logger.Error("Could not update Now Playing for track '{0} - {1}'", artist, trackTitle); } } } }