Forum » Controlling a Last.fm Stream

Calling all developers: Code is in the works this week and next, let me know what…

 
    • RNR a dit :...
    • Équipe Last.fm
    • 8 mars 2005, 22h42m

    Calling all developers: Code is in the works this week and next, let me know what the issues are.

    hey there, I have started writing a firefox extension, and came across loads of bugs already. there might still be more.

    it obviously doesn't make sense for you to be troubled with interface issues and us breaking the code all the time on top of the fun your having already.

    let's make this thread a working document for the "finalisation" of version 1 of this webservice. so hit me with any bugs.

    most of last weeks bugs were due to updated core/user.php files, with some stuff not behaving as it should have, I think I have gotten rid of the problems. but there might be more bugs as we continue to move to a new DB abstraction layer, and also changing our profile DB architecture around, so let's keep an eye on things.

    following this we might be able to push out these apps, and try to freeze the code. never seen that happen here, but we are ready for progress ;-)

    let's get going.

    Both kinds of music: Rock & Roll - SFTRI
    • jtjm a dit :...
    • Utilisateur
    • 9 mars 2005, 4h08m

    POSTs still don't seem to work properly

    Commands sent by HTTP POST are ignored - the service responds with an "OK", but doesn't act on the command itself. The following sent using playomatic using "do_post_request" instead of "do_get_request" in the send_command() function.


    POST /radio/control.php HTTP/1.1
    TE: deflate,gzip;q=0.3
    Connection: TE, close
    Host: wsdev.audioscrobbler.com
    User-Agent: Playomatic/0.3.17
    Content-Length: 53
    Content-Type: application/x-www-form-urlencoded

    session=xxxxxxxxxxxxxx&command=skip

    HTTP/1.1 200 OK
    Date: Wed, 09 Mar 2005 03:57:50 GMT
    Server: Apache/1.3.31 (Unix) PHP/4.3.9
    X-Powered-By: PHP/4.3.9
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: text/plain;charset=utf-8

    b
    response=OK
    0


    GETs work fine.

    Modifié par jtjm le 9 mars 2005, 4h10m
    • RNR a dit :...
    • Équipe Last.fm
    • 9 mars 2005, 11h37m

    keep it coming . . .

    I will look at all this.

    Both kinds of music: Rock & Roll - SFTRI
    • saeimn a dit :...
    • Utilisateur
    • 10 mars 2005, 14h41m
    I currently receive this when trying to tune a station with tune.php after opening a session:

    <br />
    <b>Notice</b>: Undefined variable: STREAM_PORT in <b>/web/site/www.audioscrobbler.com/lastfm/streamcommands.php</b> on line <b>26</b><br />
    Unable to open streamserver control socket: No such file or directory<br />
    <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /web/site/www.audioscrobbler.com/lastfm/streamcommands.php:26) in <b>/web/site/ws.audioscrobbler.com/ws.audioscrobbler.com/php/radio/tune.php</b> on line <b>29</b><br />
    response=FAILED

    and skip and ban don't work (I always get a response=ok). The strange thing is that love actually works (I use POST here too)

  • For information, I'm presently always getting response=FAILED for skip track and have been for a couple of days (with GET or POST).

    • jtjm a dit :...
    • Utilisateur
    • 12 mars 2005, 13h07m

    skip/ban/love fail

    I can confirm the "response=failed" problem with skipping, though for me it affects the love and ban commands as well. I see the same PHP errors as saeimn in the response.

    • LG1UQGFL a dit :...
    • Utilisateur
    • 14 mars 2005, 16h22m

    control.php still failing

    conrol.php operations are still failing.

    • RNR a dit :...
    • Équipe Last.fm
    • 16 mars 2005, 13h45m

    ...

    I haven't done anything yet. no time. I will try to look at all this asap. I can also confirm the STREAM_PORT issue. stay tuned.

    Both kinds of music: Rock & Roll - SFTRI
    • icarnales a dit :...
    • Utilisateur
    • 16 mars 2005, 19h42m

    Now getsession.php is broken too!

    When i try to get a session i get this message:

    Parse error: parse error, unexpected T_BOOLEAN_AND in /web/site/www.audioscrobbler.com/core/forumthread.class.php on line 105

    The player in the page is using the werbservice?

    PS: control.php is suffering from the same problem

    • RNR a dit :...
    • Équipe Last.fm
    • 21 mars 2005, 17h02m

    update . . .

    all works for me now. RJ updated folders with working live code and here we are.

    let me know if there is any probs.

    also in terms of freezing code. we are working on a new xmlhttp driven player for our site, which will also use the API. so if the API breaks everything breaks and then we know ;-) so we will all be using the same code which is good. so stay tuned.

    Both kinds of music: Rock & Roll - SFTRI
    • LG1UQGFL a dit :...
    • Utilisateur
    • 21 mars 2005, 20h03m

    trackprogress > trackduration

    I am seeing a variety of problems. The most basic
    might be repeated cases of trackprogress>trackduration
    from np.php. Like:

    streaming=true
    artist=U2
    track=New York
    trackduration=324
    trackprogress=557
    radiomode=3

    • saeimn a dit :...
    • Utilisateur
    • 21 mars 2005, 23h11m
    I'm still not able to tune to "random radio" with tune.php. I always get a "response=FAILED" as answer. I use POST variables. Everything else works fine...

    • LG1UQGFL a dit :...
    • Utilisateur
    • 25 mars 2005, 13h24m

    getsession.php broken

    '<b>Fatal error</b>: Call to undefined function: getbyprofileid() in
    <b>/web/site/ws.audioscrobbler.com/lastfm/streamcommands.php</b> on line <b>136</b><br />'

    • cmiles74 a dit :...
    • Utilisateur
    • 25 avr. 2005, 2h43m

    Problems getting a session...

    I've changed my code to use a POST instead of a GET, but I am still having problems getting a session key. Here is an excerpt of the response I get from the server.


    <br />
    <b>Notice</b>: Undefined variable: subject in <b>/web/site/ws.audioscrobbler.com/ws.audioscrobbler.com/php/radio/getsession.php</b> on line <b>45</b><br />
    <br />
    <b>Notice</b>: Undefined variable: subject in <b>/web/site/ws.audioscrobbler.com/ws.audioscrobbler.com/php/radio/getsession.php</b> on line <b>45</b><br />
    ERROR=no such user"


    This did work okay when I was using GET methods; I don't think that I'm sending a bad username and password combination. This is a Java application and I'm using HttpClient 3.0 to communicate with the server.

    I'm not sure what I'm doing wrong, any pointers would be greatly appreciated. :)

    Thank you,
    -- Miles

    Modifié par cmiles74 le 25 avr. 2005, 2h46m
    • superic a dit :...
    • Abonné
    • 26 avr. 2005, 2h08m
    I can POST or I can GET but SKIP/BAN/LOVE do not do anything :-( even though the php page returns RESPONSE=OK.

    Is this happening to anyone else?

    • cmiles74 a dit :...
    • Utilisateur
    • 27 avr. 2005, 1h53m

    Mostly working

    I've managed to get everything working but changing the station. Has anyone else had problems with this?

    Also, it is possible to get a list of friends and neighbors from Audioscrobbler? I know that I can get some playlist information from the site, but getting friends and neighbors would make it easy for people to select a particular channel.

    • jtjm a dit :...
    • Utilisateur
    • 27 avr. 2005, 20h05m

    Station changing broken

    Yes, station changing used to work, but since about the time the extra server was added, it has stopped working from the web service interface.

    An ugly workaround exists: you can change station using the pop up player from the last.fm website, and the next time you connect using your own player, the new station will be selected.

    RJ - any chance of a fix? Or details of how the protocol has changed, if that is all it is?

    • Wevah a dit :...
    • Abonné
    • 30 mai 2005, 3h29m
    I can't connect to the URL that getsession.php returns for me, currently.

    Edit: It's giving me moses.last.fm:81 for the host and port, but port 81 isn't open. ;)

    Modifié par Wevah le 30 mai 2005, 3h33m
Les utilisateurs anonymes ne peuvent pas poster de messages. Merci de vous connecter ou de créer un compte pour pouvoir intervenir dans les forums.