private void OnNextTrackStarting (IntPtr player)
{
if (GaplessEnabled) {
// Must do it here because the next track is already playing.
// If the state is anything other than loaded, assume we were just playing a track and should
// EoS it and increment its playcount etc.
if (CurrentState != PlayerState.Loaded) {
ServiceManager.PlayerEngine.IncrementLastPlayed (1.0);
OnEventChanged (PlayerEvent.EndOfStream);
OnEventChanged (PlayerEvent.StartOfStream);
}
}
}