Fórum » Controlling a Last.fm Stream

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

 
    • RNR disse...
    • Equipe
    • Mar 8 2005, 22h42

    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 disse...
    • Usuário
    • Mar 9 2005, 4h08

    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.

    Editado por jtjm em Mar 9 2005, 4h10
    • RNR disse...
    • Equipe
    • Mar 9 2005, 11h37

    keep it coming . . .

    I will look at all this.

    Both kinds of music: Rock & Roll - SFTRI
    • saeimn disse...
    • Usuário
    • Mar 10 2005, 14h41
    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 disse...
    • Usuário
    • Mar 12 2005, 13h07

    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 disse...
    • Usuário
    • Mar 14 2005, 16h22

    control.php still failing

    conrol.php operations are still failing.

    • RNR disse...
    • Equipe
    • Mar 16 2005, 13h45

    ...

    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
  • 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 disse...
    • Equipe
    • Mar 21 2005, 17h02

    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 disse...
    • Usuário
    • Mar 21 2005, 20h03

    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 disse...
    • Usuário
    • Mar 21 2005, 23h11
    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 disse...
    • Usuário
    • Mar 25 2005, 13h24

    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 disse...
    • Usuário
    • Abr 25 2005, 2h43

    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

    Editado por cmiles74 em Abr 25 2005, 2h46
    • superic disse...
    • Assinante
    • Abr 26 2005, 2h08
    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 disse...
    • Usuário
    • Abr 27 2005, 1h53

    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 disse...
    • Usuário
    • Abr 27 2005, 20h05

    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 disse...
    • Assinante
    • Mai 30 2005, 3h29
    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. ;)

    Editado por Wevah em Mai 30 2005, 3h33
Usuários anônimos não podem postar mensagens. É preciso fazer login ou criar uma conta para postar nos fóruns.