private void NotifyState() { var isPlaying = _ipc.GetPlayState().HasFlag(MusicBeeIPC.PlayState.Playing); if (isPlaying == _isPlaying) { return; } _isPlaying = isPlaying; IsPlayingChanged?.Invoke(this, _isPlaying); }
private bool RpChannelIsPlayingInMusicBee(out int matchingChannel) { if (TryGetPlayedFilePath(out string playedFilePath) && playedFilePath.Contains("radioparadise") && _playerApi.GetPlayState() == MusicBeeIPC.PlayState.Playing) { matchingChannel = Int32.Parse( _config.State.ChannelList .Where(channel => playedFilePath.Contains(channel.StreamName)) .DefaultIfEmpty(_config.State.ChannelList.First()) .FirstOrDefault() .Chan ); return(true); }
private void NotifyState() { var isPlaying = _ipc.GetPlayState().HasFlag(MusicBeeIPC.PlayState.Playing); if (isPlaying == _isPlaying) { return; } if (isPlaying) { TrackPlaying?.Invoke(this, EventArgs.Empty); } else { TrackPaused?.Invoke(this, EventArgs.Empty); } _isPlaying = isPlaying; }