public void Load(Track track) { SpotifyTrack spotifyTrack = track as SpotifyTrack; if (spotifyTrack != null) { _currentTrack = spotifyTrack; } }
public void Stop() { if (IsPlaying) { EnsureControlServiceIsAlive(); PlayerControlServiceClient controlService = new PlayerControlServiceClient(new InstanceContext(this)); try { controlService.TogglePause(); controlService.Close(); } catch (Exception) { controlService.Abort(); } _currentTrack = null; _isPaused = false; } }