private void OnPlayStateChanged(object sender, PlayStateEventArgs e) { var playing = e.Playing; var song = Spotify.Instance.GetStatus().Track; if (playing == _isPlaying) { return; } _isPlaying = playing; if (song != null) { _currentSong = new Song(song); _lastKnownSong = new Song(); } if (_isPlaying) { _sound.SetSpotifyToMute(AdPlaying); _form.UpdatePlayingTitle(SongTitle); } else { _form.UpdatePlayingTitle("Spotify"); } _form.UpdateIconSpotify(_isPlaying); }
private void OnPlayStateChanged(object sender, PlayStateEventArgs e) { if (e.Playing == _isPlaying) { return; } _isPlaying = e.Playing; _form.UpdateIconSpotify(_isPlaying); }
private void OnPlayStateChanged(object sender, PlayStateEventArgs e) { if (e.Playing == _isPlaying) { return; } _isPlaying = e.Playing; if (IsNewTrack(Spotify.Instance.GetStatus().Track) && e.Playing) { return; } _form.UpdateIconSpotify(_isPlaying); RecordSpotify(); }