From Helpful
Revision as of 17:52, 28 November 2012 by Helpful (Talk | contribs)

Jump to: navigation, search
This hasn't been updated for a while, so could be outdated (particularly if it's about something that evolves constantly, such as software).

lastfm:// urls

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)
  • lastfm://user/username (user's library)
  • lastfm://user/username/personal (user's library)
  • lastfm://user/username/neighbours
  • lastfm://user/username/recommended

  • lastfm://artist/artistname
  • lastfm://artist/artistname/similarartists
  • lastfm://artist/artistname/fans

  • lastfm://globaltags/tag

  • lastfm://group/groupname

  • lastfm://rql/rql_as_base64 (see below)

No longer allowed:

  • lastfm://user/username/loved - no longer allowed
  • lastfm://usertags/username/tag - no longer allowed (player will go to global tags?)

Apparently not:(verify)



RQL is a simple domain-specific query language used by They work the same way as the above URLs.


  • and
  • not - meaning 'and not'
  • or

I'm not sure whether you can combine or meaningfully with the other two operators, and (relatedly) whether you can use brackets.

Query elements:

  • tag:tagname
  • user:username
  • library:username
  • rec:username - recommendations for the user
  • neigh:username - neighbourhood
  • adv:username - mix radio
  • simart:"artist name" - similar artists
  • group:"group name" or group:[groupid]
  • Not available anymore: ptag, playlist, loved (verify)

Doublequotes should be used for any string that contains spaces.

Options (apparently should just be be appended; don't use and)

  • opt:rep|0.5 - how quick a track is allowed to be played again
  • opt:mainstr|0.5 - favour obscure or popular? (apparently adjusted for the (first bunch of) songs that will be played)
  • opt:discovery|true - enable or disable discovery mode


  • lastfm://rql/dGFnOnBvcCBvcHQ6bWFpbnN0cnwwLjk=
    , meaning
    tag:pop opt:mainstr|0.9
    , common pop
  • lastfm://rql/dGFnOnBvcCBvcHQ6bWFpbnN0cnwwLjA=
    , meaning
    tag:pop opt:mainstr|0.0
    , less common pop
  • lastfm://rql/YWR2Omxhc3QuaHEgb3B0OmRpc2NvdmVyeXx0cnVl
    , meaning
    adv:last.hq opt:discovery|true
    , discovery mode mix radio for user last.hq
  • lastfm://rql/dGFnOmJhZ3BpcGUgYW5kIHRhZzptZXRhbA==
    , meaning
    tag:bagpipe and tag:metal
  • lastfm://rql/dGFnOmNvd2JlbGwgYW5kIHRhZzpyb2NrIG9wdDpyZXB8MC4y
    , meaning
    tag:cowbell and tag:rock opt:rep|0.2


  • I've has some specific requests not to work very well.
  • I've had varying results to ordering the query elements in different ways (I could be thinking that up)

See also:

Running the player from your browser

This hasn't been updated for a while, so could be outdated (particularly if it's about something that evolves constantly, such as software).
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

That is, telling it how to handle lastfm:// links.

Depending on your OS (and window manager), you can rely on some lower-level protocol registration instead.

Most of this ought to be outdated, because the installer is a little more thorough now.

Note that you can usually drag the lastfm:// links from the browser to the player; there is no need to type the addresses or rely on the system's protocol registration.

Firefox (linux, windows)


  • Surf to about:config (these are your firefox settings) and search (filter) for a key named
  • If it doesn't yet exist, create it: Right-click anywhere in the config list, choose 'New' , the 'String' type, with as the preference name.
  • Its value should be the path to your player executable, eg. ~/ or /home/username/

You just created a handler for the lastfm:// protocol in firefox, which (re-)launches the executable with each lastfm:// URL.

The first time you use a link like this, firefox will ask you "this is an external program, do you want me to keep on warning you about this?". It's safe enough to turn the warning off, at least in non-evil environments (technically, trusting an application is bad security when that executable can be replaced with something bad).

In windows, the player's installer sets up what you need. If it didn't work, or more likely, if you downloaded the .zip because you have a low-permission work setup, follow the above instructions, but use a windows-style path, like "C:\Program Files\ Player\player.exe".

KDE protocol handler

You can register the protocol in KDE, which makes it usable from most places, including Konqueror and the run dialog. this link in the forums suggests creating a lastfm.protocol file in the relevant KDE directory.

Apparently this is /usr/kde/3.4/share/services/lastfm.protocol for me and for KDE version 3.4.

To be sure for your setup, do a
locate '.protocol' | grep kde
and check the KDE version you are running ('About KDE' on any KDE window).

Put the following in the file (or copy from another and alter):

exec=/path/to/ %u

Of course changing the path to a real one.

GNOME protocol handler

You can do something similar in GNOME. The settings would be visibile in the Configuration Editor (System Tools) but you cannot add a protocol in the GUI, so you need to do it from the command line:

gconftool-2 -s /desktop/gnome/url-handlers/lastfm/enabled --type bool true
gconftool-2 -s /desktop/gnome/url-handlers/lastfm/command --type string "/path/to/ %s"
gconftool-2 -s /desktop/gnome/url-handlers/lastfm/needs_terminal --type bool false

(It is possible that you need to run gconftool instead of gconftool-2, this is some version deal. I don't know, I rarely use GNOME) Things like Galeon, Epiphany and other GNOME apps should be able to handle lastfm:// links now.


Beats me what, but feel free to add. Probably some less usual browsers can still be added, or fixing a broken windows setup.