Forum » Last.fm Player Support

Adding a protocol handler (eg: lastfm://) for firefox (works in win/mac/linux)

 
    • Celadra said...
    • User
    • 10 Aug 2005, 15:06
    Pardon my ignorance, but what is this supposed to correct?

  • Thanks RJ, just what we needed :)

    Shame I can't get it to work yet, but I'm sure thats at my end ;P. XMMS just opens the "Open Playlist" dialog when you click the link. I'm trying to get amaroK to work now... I'll post back in a few :D

    BalSeraph

    EDIT: Nope - amaroK gives

    Could not start process Unable to create io-slave:
    klauncher said: Unknown protocol 'lastfm'.

    Guess I'll have to play with it a bit :D

    Any KDE whizzes know what to do here?

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
    Edited by BalSeraph on 10 Aug 2005, 15:16
    • RJ said...
    • Alumni
    • 10 Aug 2005, 15:46

    Adding a protocol handler (eg: lastfm://) for firefox (works in win/mac/linux)

    Type in "about:config" in the location bar
    right click, select New --> String

    name of string should be: "network.protocol-handler.app.lastfm"
    value should be the path to your player executable, eg "~/Last.fm/player"

    Information wants to be beer.
  • Ok, it works with the Player source code.

    Yay I have Last.fm at home again :)

    A big gratz to the staff - the hard work is paying off guys. I for one love the new site :D

    BalSeraph

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
    • mcyeager said...
    • Subscriber
    • 10 Aug 2005, 18:16

    hmmm

    Tried it with the compiled player and the source code version, but am still gettting the "not a registered protocol" error. Using Firefox on XP.

    • StephyT said...
    • User
    • 10 Aug 2005, 19:41

    Re: undefined

    Quoth mcyeager:
    Tried it with the compiled player and the source code version, but am still gettting the "not a registered protocol" error. Using Firefox on XP.



    Same for me as well. Running the same OS and using the same browser. Will try at home (at office currently, patiently waiting on the lovely office version of the player tomorrow) and will update this post if anything changes.

    Could it possibly be because I don't have admin priv's on this machine?


    Edit: At home now, Windows version of LastFM player is working just fine.

    Edited by StephyT on 11 Aug 2005, 00:56
  • Hmm,

    Was straightforward for me. about:config to enter the location of the player, and then click on the link on my Profile page. Firefox popped up a warning, but only a sensible one about executables run from within webpages. Ok'ing that ran the player, and the stream started fine.

    Where are you falling down guys - have you doubled checked the about:config entry?

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
    • mcyeager said...
    • Subscriber
    • 10 Aug 2005, 21:09

    location

    Firefox doesn't seem to find the app. Maybe the string I enter is bad e.g.

    C:\Documents and Settings\username\My Documents\apps\Last.fm Player\player

    I've tried ~ instead of C:... and tried adding .exe on the end, but firefox doesn't even seem to try to find it...

  • Hmm

    Being a Linux user, my path doesn't have spaces in it. This is trivial, I know, but have you tried using quotes (") to protect the spaces?

    "C:\Documents and Settings\username\My Documents\apps\Last.fm Player\player"

    Might be worth a try

    BalSeraph

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
    • Kouk said...
    • User
    • 10 Aug 2005, 21:33

    Re:


    Could not start process Unable to create io-slave:
    klauncher said: Unknown protocol 'lastfm'.

    Guess I'll have to play with it a bit :D

    Any KDE whizzes know what to do here?


    Not that I'm a KDE whizz or anything, but to register a protocol handler you have to create a file like $KDEDIR/share/services/lastfm.protocol
    with the following contents:


    [Protocol]
    exec=/path/to/player "%u"
    protocol=lastfm
    input=none
    output=none
    helper=true
    listing=
    reading=false
    writing=false
    makedir=false
    deleting=false


    Edited by Kouk on 10 Aug 2005, 21:35
  • Not that I'm a KDE whizz or anything

    Better than me :)

    I'll try that at work tomorrow - assuming I need to. If the stand-alone player is out, then I won't :P

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
    • mcyeager said...
    • Subscriber
    • 11 Aug 2005, 01:43

    Good News!

    Screw the protocol problem...

    -download the new version of the player
    -open the tool icon and choose "enter station Address"
    -drag the link you want from the browser in the the station address box.
    - DELETE the last 2 words (e.g. neighbour radio)
    - hit ok and ENJOY!

    • Datcyde said...
    • User
    • 11 Aug 2005, 05:26
    kool it works.....

    The value in firefox should be "C:\Program Files\Last.fm Player\player.exe"

    Edited by Datcyde on 11 Aug 2005, 05:53
  • Gratz on getting it working :D

    I must say, (Global) Tag Radio is fantastic! LD

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
  • No joy

    Have tried the "new string" bit.
    Tired dragging the link into the "enter station address bit".
    Still no luck :(

    Any more ideas??

    Using Firefox and XP

    Cheers

    Must remember to insert some witty quote here which makes me look intellectual/funny/cuddly/hard
  • Re: undefined


    [Protocol]
    exec=/path/to/player "%u"
    protocol=lastfm
    input=none
    output=none
    helper=true
    listing=
    reading=false
    writing=false
    makedir=false
    deleting=false



    Hmm, can't get it to work. The problem now is I don't know what to put it the exec entry - simply putting /usr/bin/amarok clearly doesn't work. I'll have to think a bit - any help appreciated...

    BalSeraph

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
  • Amarok wont work

    You have to download and build the player that last.fm wrote. Then change the path you made to amarok point to the location of the player. In my case I made a shell script point to the player binary under a folder, since the binary needs to be able to find the images, etc. you can't just throw it into ~/bin.

    It looks like museli is one of the developers of the player, so hopefully the ability to play last.fm streams will make it into amarok eventually.

    • noleti said...
    • User
    • 12 Aug 2005, 01:11

    Re: undefined

    Quoth phlogistonjohn:
    You have to download and build the player that last.fm wrote. Then change the path you made to amarok point to the location of the player. In my case I made a shell script point to the player binary under a folder, since the binary needs to be able to find the images, etc. you can't just throw it into ~/bin.

    It looks like museli is one of the developers of the player, so hopefully the ability to play last.fm streams will make it into amarok eventually.

    thats where I knew his name from - I guess you're right! Thats going to be soo awesome :)

    /edit:
    on topic: I put /home/noleti/Last.fm-src/player in that field :)

    Edited by noleti on 12 Aug 2005, 01:12
  • Thanks heaps for the KDE protocol info - works perfectly in konqueror.
    (At least it did once I realised I'd put the lastfm.protocol file in the wrong place - d'oh!)

    It's not me, it's you.
  • amaroK

    Well, I realise that :)

    My point was to try and find a work-around for those of us who use Linux in the office, and don't have Qt4 installed there (which we don't - too new). I was trying to find a way to handle the stream in something else.

    I guess it's just too complicated an issue to be resolved by such a simple trick - wait for a Linux binary I guess :)

    Ah well, I'm not in the office til Monday now, so I can listen all weekend (Qt4 not a prob on my home boxes :D)

    BalSeraph

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
  • Yeah, I know :) Was just confirming, though, that it IS the correct way to add the protocol handler.

    I did take a quick look at amarok scripting, but as I'm very much a NON-scripter, someone else is goingto have to write it ;)

    You're right though, last.fm integration into amaroK would be awesome, and hopefully only a matter of time. If they managed to sneak podcast support into 1.3-beta3, then I'm sure it won't take long!

    edit: specially in light of this: http://amarok.kde.org/component/option,com_simpleboard/Itemid,57/func,view/id,7142/catid,9/

    It's not me, it's you.
    Edited by dangle_wtf on 12 Aug 2005, 10:09
  • Fabulous!

    I kinda figured muesli would get on to it when things settle down here - I'm just impatient dammit! :D

    Ah well, useful KDE protocol knowledge stored away there :)

    Rock on, the Last.fm team!

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
  • Re: compiling the player with Qt4

    I haven't tried it, but you might be able to try statically linking in Qt 4 and then trying that on your work PC.

    If I had access to my home pc atm I would try building it that way now, but I'm at work and it seems my IP has changed :-P

    Edited by phlogistonjohn on 12 Aug 2005, 19:53
  • I had a go at statically linking in Qt4 - but putting -static in the Makefile didn't work. I might give it a more thorough go on Monday.

    BalSeraph

    [url=http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3 nofollow=yes]http://www.denness.net/rpi/username/BalSeraph?fs=8&show=3[/url]
  • I worked on it a little Friday and Saturday. After rebuilding qt 4 or so times, I've kinda given up. It seems to work up until it tries to link in fontconfig, and it dies with a lot of undefined references. I don't really know why though. Qt itself seems fine. I guess we'll just have to wait for an official binary... sigh.

    On a side note, static in the qmake file doesn't seem to do much at all, to try and get it to link I added -static to the line in the generated makefile on the LFLAGS line.

    We should probably start a new thread for building the linux client though. We've gone pretty off topic.

    EDIT: Oh, the binary is already out. Don't blame me I just bookmared this thread. :-)

    Edited by phlogistonjohn on 14 Aug 2005, 22:18
Anonymous users may not post messages. Please log in or create an account to post in the forums.