Articles

RSS
  • Last.fm Playlist and Tag Manager v1.6 (formerly Last.FM Playlist Generator)

    6 Oct 2008, 01:42 by maarten_gm

    Complete playlist/tag management: create, add, copy, merge, and convert. Export tracks to tab-separated text output. Import tracks in one go rather than having to search for and add tracks one-by-one.

    Here's what changed:
    - changed script name
    - made script runnable on localized Last.fm sites too
    - made script appear on those pages it's needed (rather than only on playlist page)
    - created specific import/export sections
    - added all playlist options to tags as well including the ability to turn playlist into tag
    - added export tracks option
    - added black/red skin support

    For a full description, the script source, to view a screen shot, or to install, please visit: http://userscripts.org/scripts/show/32963.

    The support thread for this script is at the Greasemonkeys group.
  • Script to sort artists by time played

    7 Sep 2008, 00:33 by snyde1

    There is an Opera user script available which allows you to sort your top artists by the total length of time of their songs that you've scrobbled. While it works with Greasemonkey, Greasemonkey users may prefer gadgetchannel's Greasemonkey script, as that is quicker.

    Script info:
    Forum thread
    Script download
  • Last.fm Playlist and Tag Manager v1.7

    24 Nov 2008, 05:10 by maarten_gm

    Complete playlist/tag management: create, add, copy, merge, and convert. Export tracks to tab-separated text output. Import tracks in one go rather than having to search for and add tracks one-by-one.

    Here's what changed:
    - add export options to group charts
    - add export options to similar tracks
    - add export options to tagged tracks
    - add export options to user charts
    - add progress indicator for lengthy operations
    - keep output area scrolled to last line

    For a full description, the script source, to view a screen shot, or to install, please visit: http://userscripts.org/scripts/show/32963.

    The support thread for this script is at the Greasemonkeys group.
  • Converting Greasemonkey scripts to work in Google Chrome

    13 Dec 2008, 17:34 by gadgetchannel

    Google Chrome has some limited support for Greasemonkey scripts (by using the --enable-greasemonkey command line argument), so I have been looking at making some of my last.fm Greasemonkey scripts work in Chrome. There are a few limitations. I will go through each one, with their workarounds:

    Chrome ignores script metadata including @include and @exclude
    In Chrome all Greasemonkey scripts are applied to all pages. The workaround is to include checking in the script, either based on the URL or a unique tag id / class name known to be present on the correct page.

    No GM_setValue GM_getValue
    This means that by default there is no way of saving / loading settings and if a script uses these methods it will fail. A workaround is to use cookies. This can be added to your script to allow it to work in Chrome:

    function createCookie(name,value,days) {
    if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
    }

    function readCookie(name,defaultvalue) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
    var c = ca;
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return defaultvalue;
    }

    if(!window.GM_setValue)
    {
    window.GM_setValue = function(valuename, value) { createCookie(valuename,value,365); };
    }
    if(!window.GM_getValue)
    {
    window.GM_getValue = function(valuename, defaultvalue) { return readCookie(valuename,defaultvalue); };
    }

    No unsafeWindow
    This does not actually appear to be needed in Chrome, but will cause an error if used. Adding this should prevent errors:

    if(!window.unsafeWindow)
    {
    window.unsafeWindow = window;
    }

    No cross-domain HTTP requests
    The GM_xmlhttpRequest function does not work in Chrome. It is possible to use the xmlhttpRequest object, but this only works for the same domain. A workaround is to use a proxy which will convert the XML feed to JSON format. An example using a Yahoo Pipe is shown below:

    // Gets XML feeds, converting them to JSON
    // using the getXML Yahoo Pipe - http://pipes.yahoo.com/sanand/getxml
    function getFeed(feed,callback) {
    var newScript = document.createElement('script');
    newScript.type = 'text/javascript';
    var tim = new Date();
    newScript.src = 'http://pipes.yahoo.com/pipes/hrDp8A0v3RGr1Dm_yZ1_DQ/run?_render=json&_callback=' + callback + '&url='+escape(feed) + '&cache=' + tim.toGMTString();
    document.getElementsByTagName("head")[0].appendChild(newScript);
    }
  • Last.FM Playlist Generator v1.5

    12 Sep 2008, 05:59 by maarten_gm

    Generates a Last.FM playlist from user input, tag or playlist.

    For a full description, the script source, to view a screen shot, or to install, please visit: http://userscripts.org/scripts/show/32963.

    The support thread for this script is at the Greasemonkeys group.
  • Lyrics for last.fm radio

    27 Oct 2008, 07:28 by reeloo

  • Average artist/track plays enhancement

    24 Oct 2008, 23:09 by snyde1

    I've added links in the output of this script to link to the "playground" experimental features for artist aliases and "musical soulmates" (new neighbours) to allow you to find what other names the artists might be recording under and to see which listeners of the band might share some of your musical tastes.

    Discussion
    User script
  • A script for showing lyrics on track pages

    15 Apr 2008, 09:44 by esc4p1st

    I recently came across the non-profit lyrics website LyricWiki, and was struck by how well-suited lyrics are for the wiki medium. I have previously preferred SongMeanings, but LyricWiki already matches it in terms of content, and has an enormous potential (if it manages to avoid the threat of being sued out of existence by greedy rights-owners, that is).

    I have also wished, like many others, that song lyrics were included on Last.fm. So I got the idea to write a Greasemonkey script that added song lyrics to Last.fm track pages, using lyrics from LyricWiki.

    The result, when for example viewing the page for the song Ode We Will Bury Ourselves by Moving Mountains looks like this:



    In order to use the script, you need to be using the Firefox browser and have the GreaseMonkey extension installed. Once you do, install the script and try it out.

    I thought that, since the lyrics panel can grow pretty big, it would be nice to be able to collapse the panel, hiding the lyrics. The setting is persistent, and when a track page is loaded with the panel collapsed, the lyrics are not loaded until it is expanded, eliminating unnecessary requests to LyricWiki.

    Also, I couldn't decide where on the page to put the panel, so I made it possible for the user to choose where to place it, using arrow buttons.

    (The script is hosted at Userscripts.org.)
  • Super-awesome charts for whenever you want

    23 Feb 2008, 15:30 by aradnuk

    For whatever reason, LastFM doesn't allow you to give two dates and see a chart of what you listened to in that time, so I made it instead. For example, this is my chart for 2006. It's quite cool poking about with different dates and seeing how your taste has changed through months and years.

    If you want to do the same with your data, go here, stick your username in the box and wait for everything to be collected. You have to do this if you want your data updated too.

    Some people seem to have a few corrupted weeks, for example this should be one for lbf but an artist has become '??t?Ê?¤?Õ'. Not sure what I can do about that. If you get any errors, report them back here or PM me and I'll see if they can be fixed. (It'll tell you of an error the first time you make a chart but if you're loading one that's been cached then you won't get the notice.)

    The rest is self-explanatory. Oh, dates must be in the format dd-mm-yyyy. And numitems is the number of artists to display in the chart.

    Enjoy :-)
  • Kinda useful,...

    5 Dec 2007, 15:30 by WyldStallyn

    kind of useful, but I've already heard of most if not all of these artists.


    Take the 50 top artists in your musical profile, and create a cloud of the similar artists that are not in your top 50. The result is a collection of highly recommended artists for your personal profile. You can generate your own cloud (in BBCode) at http://anthony.liekens.net/pub/scripts/last.fm/recommend.php

    My recommendations are
    ...And You Will Know Us by the Trail of Dead Arctic Monkeys Babyshambles Badly Drawn Boy Beck Blonde Redhead Blur British Sea Power Broken Social Scene Clap Your Hands Say Yeah Coldplay Death Cab for Cutie Death From Above 1979 Doves Elbow Franz Ferdinand Frou Frou Garbage Gorillaz Kaiser Chiefs Kasabian Keane Modest Mouse Mogwai Morrissey Muse My Bloody Valentine Nine Inch Nails Oasis Pavement Placebo Pulp Razorlight Sigur Rós Snow Patrol Stereolab TV on the Radio The Bravery The Dandy Warhols The Fiery Furnaces The Flaming Lips The Futureheads The Go! Team The Killers The Postal Service The Smashing Pumpkins The Smiths The Verve Travis Yo La Tengo