Forum » Last.fm Player Support

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

 
    • Celadra a dit :...
    • Utilisateur
    • 10 août 2005, 15h06m
    Pardon my ignorance, but what is this supposed to correct?

    • BalSeraph a dit :...
    • Utilisateur
    • 10 août 2005, 15h13m
    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]
    Modifié par BalSeraph le 10 août 2005, 15h16m
    • RJ a dit :...
    • Alumni
    • 10 août 2005, 15h46m

    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.
    • BalSeraph a dit :...
    • Utilisateur
    • 10 août 2005, 17h09m
    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 a dit :...
    • Abonné
    • 10 août 2005, 18h16m

    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 a dit :...
    • Utilisateur
    • 10 août 2005, 19h41m

    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.

    Modifié par StephyT le 11 août 2005, 0h56m
    • BalSeraph a dit :...
    • Utilisateur
    • 10 août 2005, 21h02m
    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 a dit :...
    • Abonné
    • 10 août 2005, 21h09m

    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...

    • BalSeraph a dit :...
    • Utilisateur
    • 10 août 2005, 21h32m
    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 a dit :...
    • Utilisateur
    • 10 août 2005, 21h33m

    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


    Modifié par Kouk le 10 août 2005, 21h35m
    • BalSeraph a dit :...
    • Utilisateur
    • 10 août 2005, 21h37m
    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 a dit :...
    • Abonné
    • 11 août 2005, 1h43m

    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 a dit :...
    • Utilisateur
    • 11 août 2005, 5h26m
    kool it works.....

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

    Modifié par Datcyde le 11 août 2005, 5h53m
    • BalSeraph a dit :...
    • Utilisateur
    • 11 août 2005, 8h02m
    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]
    • parsimony a dit :...
    • Utilisateur
    • 11 août 2005, 9h12m

    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
    • BalSeraph a dit :...
    • Utilisateur
    • 11 août 2005, 10h10m

    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 a dit :...
    • Utilisateur
    • 12 août 2005, 1h11m

    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 :)

    Modifié par noleti le 12 août 2005, 1h12m
    • dangle_wtf a dit :...
    • Utilisateur
    • 12 août 2005, 6h01m
    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.
    • BalSeraph a dit :...
    • Utilisateur
    • 12 août 2005, 7h16m

    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]
    • dangle_wtf a dit :...
    • Utilisateur
    • 12 août 2005, 10h06m
    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.
    Modifié par dangle_wtf le 12 août 2005, 10h09m
    • BalSeraph a dit :...
    • Utilisateur
    • 12 août 2005, 14h37m
    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

    Modifié par phlogistonjohn le 12 août 2005, 19h53m
    • BalSeraph a dit :...
    • Utilisateur
    • 13 août 2005, 1h00m
    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. :-)

    Modifié par phlogistonjohn le 14 août 2005, 22h18m
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.