The Artist -> Artist, The

2011-04-02
2013-05-30
  • Tired of seeing The Beatles listed under letter T instead of B? Do this small change to your import.js script, after enabling it in your config.xml.
    In the else branch of the `if (!artist)' condition at line 44 add the following line

    //Start-Normalize artist
        artist = normArtist(artist);
    //End-Normalize artist
    

    Then, at the end of the file, add the normArtist function:

    //Start-Normalize artist
    function normArtist(artist) {
        var s = artist.substr(0, 4);
        if(s.toUpperCase() == "THE ") {
            s = artist.substring(4);
            s = s + ', The';
        }
        else
            s = artist;
        return s;
    }
    //End-Normalize artist
    

    Et voilà: Now, when browsing Audio/Artist `The Beatles' will be listed as 'Beatles, The' under letter B