/// <inheritdoc /> public ShuffleState SwitchShuffle() { var shuffleEnabled = _api.Player_GetShuffle(); var autoDjEnabled = _api.Player_GetAutoDjEnabled(); var shuffleState = GetShuffleState(); if (shuffleEnabled && !autoDjEnabled) { var success = _api.Player_StartAutoDj(); if (success) { shuffleState = ShuffleState.Autodj; } } else if (autoDjEnabled) { _api.Player_EndAutoDj(); } else { var success = _api.Player_SetShuffle(true); if (success) { shuffleState = ShuffleState.Shuffle; } } return(shuffleState); }