Forum » Last.fm Player Support

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

 
    • Zeroangel schrieb...
    • Benutzer
    • 4. Nov. 2006, 22:38
    Hey all,

    I've set-up amarok to play last.fm streams by using the about:config entry

    network.protocol-handler.app.lastfm = /usr/bin/amarok --queue

    But it doesnt seem to work, so I've had to remove the --queue designation and just use "/usr/bin/amarok". This is a problem because now clicking on a last.fm link will clear my playlist.

    Does anyone have any workarounds? I would much prefer to have last.fm links play immediately but preserve my current playlist.

    • benizi schrieb...
    • Benutzer
    • 9. Nov. 2006, 9:05

    Workaround

    As a workaround, you can create a script that will execute amarok for you. protocol-handlers get the URL as the only parameter passed to the script. The following, if $DIR is in your PATH, should create a script that will do the job:

    DIR=$HOME/bin # change to suit
    cat <<'SCRIPT' > $DIR/lastfm
    #!/bin/sh
    exec /usr/bin/amarok --queue "$@"
    SCRIPT
    chmod +x $DIR/lastfm

    Then update network.protocol-handler.app.lastfm = lastfm (or the full path, if $DIR's not in your path).

    • rolandog schrieb...
    • Benutzer
    • 20. Nov. 2006, 10:34

    Thanks a lot!

    Thanks for the workaround. I tested it and it worked perfectly.

  • RJ said:
    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"


    Thanks a lot. I'm really glad you posted this.

    • deodatus schrieb...
    • Benutzer
    • 9. Feb. 2007, 22:50
    the new-->string method worked flawlessly for me.
    thanks to whoever knew about this!!

    OS: UBUNTU linux

    • tegin schrieb...
    • Benutzer
    • 16. Mai. 2007, 13:03
    Thank you! No more flash for me :-)

    • siuzi_wru schrieb...
    • Benutzer
    • 11. Jan. 2009, 0:30

    still problem

    ....protocol (lastfm) isn't associated with any program.

    what exactly the value should look like?
    firefox 2.0.0.20
    windows vista

    Why give away our secrets? Because if they stay secrets, we’re fucked.
    • [Gelöschter Benutzer] schrieb...
    • Benutzer
    • 5. Apr. 2009, 9:41
    Thanks a lot. It worked.

    • R_U_Bn schrieb...
    • Benutzer
    • 23. Mai. 2009, 14:04

    Windows

    On Windows, you actually have to change your registry, see:
    Register Protocol (Firefox-Windows)
    Only THEN it workes for me.
    Hope this helps those still stuck!

    Listener / developer (www.e-builds.com)
  • Gah!

    Bah gah! I added Palace:// protocol to Firefox, now can't find where it got registered. (*.*) It's not in about:config, search for "palace" or "app.palace" doesn't give anything.
    I'm on Firefox 4 beta 8 Portable, Neither registry, nor config contain the handler.

Anonyme Benutzer dürfen keine Beiträge schreiben. Bitte log dich ein oder registriere dich, um Beiträge in den Foren schreiben zu können.