piotrraczynski / squeezenode

Node.js wrapper library for squeezebox CLI/json interface with Spotify/SoundCloud support
MIT License
22 stars 17 forks source link

Control register #2

Open darkjeff99 opened 10 years ago

darkjeff99 commented 10 years ago

Hi

I'm a new developer in node.js and I use you amazing project for build new squeezebox UI.

It's work good for the moment, but now I want to handle the connection error.

How I know if the function .on it's ok ?

squeeze.on('register', function(){ //you're ready to use the api, eg. squeeze.getPlayers( function(reply) { console.dir(reply); }); });

If I try without logitech server, I have :

\node_modules\squeezenode\server.js:98 var apps = reply.result.appss_loop; ^ TypeError: Cannot read property 'appss_loop' of undefined

The node continue without connection.

piotrraczynski commented 10 years ago

Thanks for point this out. I'll take a look at it.