Giter Site home page Giter Site logo

squeezenode's People

Contributors

merdeka avatar piotrraczynski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

squeezenode's Issues

Have you figured out how to play songs

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

Control register

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.

playing spotify songs

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?

how I can load a playlist spotify on a player and play 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 ?

Does the demo code require Spotify Plugin?

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?

npm install does not install dependencies.

When npm install squeezenode is executed, it does not install it's dependencies (jayson for now)

Steps to reproduce:

  1. npm install squeezenode
  2. cd node_modules/squeezenode

Expected: node_modules drectory present with jayson installed as dependency.
Actual: dependencies not present.

Error: Cannot find module 'squeezenode'

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.