Пример #1
0
        private void OnPlayStateChange(PlayStateEventArgs e)
        {
            model.IsPlaying = e.playing;

            Track track = mh.GetCurrentTrack();

            if (track != null)
            {
                if (model.IsPlaying)
                {
                    if (track == model.LastTrack)
                    {
                        growl.MusicResumed(track.GetArtistName(), track.GetTrackName(), track.GetAlbumArtURL(AlbumArtSize.SIZE_160));
                    }
                    if (model.LastTrack == null)
                    {
                        UpdateTrack(track);
                    }
                }
                else
                {
                    growl.MusicPaused(track.GetArtistName(), track.GetTrackName(), track.GetAlbumArtURL(AlbumArtSize.SIZE_160));
                }
            }
        }
Пример #2
0
        private void _spotify_OnPlayStateChange(object sender, PlayStateEventArgs e)
        {
            if (model.IsAdPlaying)
            {
                return;
            }

            model.IsPlaying = e.Playing;

            if (_currentTrack != null)
            {
                if (model.IsPlaying)
                {
                    if (_currentTrack == model.LastTrack)
                    {
                        _growl.MusicResumed(_currentTrack.ArtistResource.Name, _currentTrack.TrackResource.Name, _currentSmallCoverUrl);
                    }
                    if (model.LastTrack == null)
                    {
                        UpdateTrack();
                    }
                }
                else
                {
                    _growl.MusicPaused(_currentTrack.ArtistResource.Name, _currentTrack.TrackResource.Name, _currentSmallCoverUrl);
                }
            }
        }