Cosford
Cosford

Reputation: 1

Getting spotify desktop player status

I come from an electronics background, with a project whereby I'd like to be able to obtain various information about the state of the desktop player, eg

Is there an active API or other method which will allow me to obtain this information and get it out of the desktop app itself, such that I might be able to send that information out via a COM port?

Thanks in advance.

Upvotes: 0

Views: 201

Answers (1)

Jonas Dellinger
Jonas Dellinger

Reputation: 1364

You could use my .NET Library SpotifyAPI .NET

It combines the spotify-local and spotify-web API.
Also, it provides all your required information and is simple to use. Small example:

SpotifyLocalAPIClass spotify = new SpotifyLocalAPIClass();

if(!spotify.Connect())
    return;

SpotifyMusicHandler mh = spotify.GetMusicHandler();
SpotifyEventHandler eh = spotify.GetEventHandler();

Console.WriteLine(mh.GetCurrentTrack().GetTrackName());

Upvotes: 0

Related Questions