public void changeSettings(bool autoDJ, bool equaliser, bool shuffle, RepeatMode repeat)
        {
            bool       autoDJMusicbee    = mbApiInterface_.Player_GetAutoDjEnabled();
            bool       equaliserMusicbee = mbApiInterface_.Player_GetEqualiserEnabled();
            RepeatMode repeatMusicbee    = mbApiInterface_.Player_GetRepeat();
            bool       shuffleMusicbee   = mbApiInterface_.Player_GetShuffle();

            if (autoDJ && autoDJMusicbee != autoDJ)
            {
                mbApiInterface_.Player_StartAutoDj();
            }
            else if (autoDJMusicbee != autoDJ)
            {
                mbApiInterface_.Player_SetShuffle(true);
                mbApiInterface_.Player_SetShuffle(false);
            }

            if (equaliserMusicbee != equaliser)
            {
                mbApiInterface_.Player_SetEqualiserEnabled(equaliser);
            }

            if (repeat != repeatMusicbee)
            {
                mbApiInterface_.Player_SetRepeat(repeat);
            }

            if (shuffle != shuffleMusicbee)
            {
                mbApiInterface_.Player_SetShuffle(shuffle);
            }
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public ShuffleState GetShuffleState()
        {
            var shuffleEnabled = _api.Player_GetShuffle();
            var autoDjEnabled  = _api.Player_GetAutoDjEnabled();
            var state          = ShuffleState.Off;

            if (shuffleEnabled && !autoDjEnabled)
            {
                state = ShuffleState.Shuffle;
            }
            else if (autoDjEnabled)
            {
                state = ShuffleState.Autodj;
            }

            return(state);
        }
Ejemplo n.º 3
0
 private void UpdateActiveFlag()
 {
     if (mbApiInterface.Player_GetShuffle() == true)
     {
         active = skip_on_shuffle;
     }
     else if (mbApiInterface.Player_GetAutoDjEnabled() == true)
     {
         active = skip_on_autodj;
     }
     else
     {
         active = false;
     }
 }