piotrraczynski / squeezenode Goto Github PK
View Code? Open in Web Editor NEWNode.js wrapper library for squeezebox CLI/json interface with Spotify/SoundCloud support
License: MIT License
Node.js wrapper library for squeezebox CLI/json interface with Spotify/SoundCloud support
License: MIT License
When using the example code in your readme I get the following error:
Error: Cannot find module 'squeezenode'
offcourse I did a npm install in the folder.
Hi, i am having some problem getting it to work, there is so little documentation.
The readme say i should read the spotify examples but i cant find any examples...
could you please add some documentation and/or examples on how to get and play a spotify song?
hello,
I try to load a play list in a player (with his player id) and start playing list song of the playlist but I dont see how do that :-)
can you help me
now I test this code but ...
exports.play_playlist = function (playlist_uri) {
console.log(playlist_uri)
//subscribe for the 'register' event to ensure player registration is complete
squeeze.on('register', function () {
//you're ready to use the api, eg.
squeeze.getPlayers(function (reply) {
console.dir(reply);
});
});
squeeze.on('register', function () {
//we only need a couple (5) of search results
//Now let's play the song with our player
playerIdByName(config.nom_player, function (pl) {
if (reply.ok) {
squeeze.apps.spotify.loadToPlaylist(playlist_uri, pl.playerId, function (reply) {
if (!reply.ok) {
console.dir(reply);
}
//if needed, let's adjust the volume
squeeze.players[pl.playerId].setVolume(40);
//Enjoy listening
});
}
});
});
}
can you help me please ?
for example: http://192.168.0.50/music/1.mp3
I can't seem to get the Demo code to work. It runs, and I get the command prompt but none of the commands work, not even 'help'. I don't get any errors. Could this be due to the lack of Spotify plugin on LMS?
When npm install squeezenode is executed, it does not install it's dependencies (jayson for now)
Steps to reproduce:
Expected: node_modules drectory present with jayson installed as dependency.
Actual: dependencies not present.
Hey,
Having a play with your API wrapper.
Like everyone else i was hoping that the logitech media server would include some kind of restful API.
I'm planning on making some kind of nice front-end interface for it, that works on mobile.
So the closest i have got with your example code is this (which isn't very far)
squeeze.on('register', function(){
squeeze.getPlayers( function(reply) {
var player = reply.result[0];
squeeze.request(player.id, ["albums", 0, 1000], function (reply){
console.log(reply.result);
});
squeeze.request(player.id, ["songs", 0, 1000], function (reply){
console.log(reply.result);
});
}
});
});
which returns me an array of albums and songs.
Here is an example song :
[{ id: 484,
title: 'Btoum-Roumada',
genre: 'Braindance',
artist: 'Aphex Twin',
album: 'drukqs (Disc Two)',
duration: '116.818' }]
I was hoping that i could just do:
squeeze.request(player.id, ["play", song.id], function (reply){
console.log(reply.result);
});
But that does nothing... but is almost in tune with how their URLs work
have you found a way to communicate with it to do this ?
In the web interface you would put in a url like this to play songs ( as its doesnt seem to go through the json request to actually play)
http://<URL>:9000/clixmlbrowser/clicmd=browselibrary+items&linktitle=BROWSE_BY_ARTIST&mode=artists/index.html?index=51.0&player=6e%3A24%3A51%3A96%3A68%3Aa2&sess=
or to just tell the players to start playing :
http://<URL>:9000/status_header.html?p0=play&player=<PLAYER ID>
I notice in your squeezeplayer.js class that you touch on the "play" but go no further.
Alternatively I could use their telnet interface to communicate with it, but in my opinion slightly overkill.
Thanks
DJ
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.