Amarok, MySQL, JSON and Greasemonkey

The nice thing about Amarok as a media library, apart from all the functions in the player, is that it can store library data in a MySQL database (the default is SQLite), making it accessible to external scripting. For example, you can have a PHP script like this, running locally (requires php-json; set the username, password and database name as appropriate):

$artist = $_GET['artist'];
$link = mysql_connect('localhost', 'DB_USER', 'DB_PASS');
$result = mysql_query("SELECT as album FROM `artist` a JOIN `tags` t ON = t.artist JOIN `album` b ON t.album = WHERE = '$artist' GROUP by album");
$albums = array();
while($album = mysql_fetch_object($result)){
    $albums[] = $album;
print json_encode($albums); 

called by a Greasemonkey script like this (edit the URL for the local script as appropriate), and it will show all the albums in your collection by a particular artist, right in the web page. To use the Greasemonkey script on a different site, just change the XPath selector so that it finds the artist name and add the site URL pattern to the list of included pages.