| Script Summary: v1.6: 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. |
This script has no discussions. |
This script has no reviews. |
Please make sure you've uninstalled any and all old version(s) of this script via Tools->Greasemonkey->Manage User Scripts...Last.fm Playlist and Tag Manager, v1.6 (05 Oct 2008) [source]
Select Last.fm Playlist and Tag Manager and press the Uninstall button.
Then, if you haven't already, install the latest version of this script.
This script will generate a Last.fm playlist or tag from a user's direct text input, or from an existing playlist or tag. When collecting tracks, it'll favor streamable tracks. If multiple tracks match the user input, it'll pick the first streamable track in the list. If there is no streamable track, it'll pick the first track in the list, unless the "streamable only" box is checked, then it'll skip the track.
Screen shot:History:
- 2008-10-05: v1.6: 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
- 2008-09-06: v1.5: add option to add tracks from someone else's playlist or tag
- 2008-09-06: v1.4: add option to add tracks from an existing playlist or tag
- 2008-09-01: v1.3: add option to add streamable tracks only
- 2008-09-01: v1.2: remove use of Array.shift(); add option to allow pasting a Yahoo! Music playlist
- 2008-08-31: v1.1: complete rewrite using singleton pattern
- 2008-08-29: v1.0: initial version: processes all tracks
Known Issues (also see my to-do list):
- Only tracks are added, not artists. The script skips artists without warning. As I haven't made up my mind if artists belong in playlists, this may or may not be fixed in a later release.
- Last.fm has a 200 track limit on playlists. The script will stop as soon as 200 tracks are added to a playlist.
- Some tracks may not exist in the Last.fm library and/or the
user-supplied search term may not return any results.
Tracks that cannot be found are identified as such in the output area. - An unsolved issue exists in the script's regular expression code.
Sometimes it does not find any match while there is one.
Just having the script try again usually works, and so the script does
only one re-try.
If no match was found after one try, the track will be logged as a parse error in the output area. - When adding the tracks from an existing playlist or tag, any tracks that
already exist in the target playlist or tag are not added again.
This is standard Last.fm behaviour. - Very limited URL validation is implemented. If the script becomes unresponsive, make sure you have entered a valid playlist or tag URL.
- The script is slow. Despite Last.fm policy of not making more than 5
requests per second (see section 4.4 of the TOS), I found that reliable
results are only possible if no more than 2 requests per second are made.
Depending on network latency, I've seen the script taking up to 4 seconds per track. Please be patient. ;-)
Example: merge playlists/tags:
- Navigate to the playlist/tag you want to merge other playlists/tags into. At the bottom of the page, choose one of the playlist/tag import options. Follow "Usage instructions" below. Repeat as necessary.
Example: convert a tag into a playlist or vice versa:
- Navigate to the playlist/tag you want to convert. At the bottom of the page, choose one of the export options to copy the tracks to. Follow "Usage instructions" below.
Example: copy someone else's playlist/tag:
- Navigate to the playlist/tag you want to copy. At the bottom of the page, choose one of the export options to copy the tracks to. Follow "Usage instructions" below.
Example: add some random tracks to a new or existing playlist/tag:
- Navigate to one of your playlists/tags. At the bottom of the page, choose the Search import option and enter your artist/song search queries (one per line) in the input area. Follow "Usage instructions" below.
Example: import a playlist from Yahoo! Music:
- Start Yahoo! Music
- Select a playlist
- Right-click in the playlist and select "Select All"
- Right-click in the playlist and select "Copy to Clipboard"
- Navigate to the playlist/tag you want to add the tracks to.
- Follow "Usage instructions" below, with these exceptions:
- In step 4, paste the clipboard contents into the Last.fm Playlist and Tag Manager
- Check the "I have pasted a Yahoo! Music playlist" option
- Continue with step 5
Installation instructions:
- Install Greasemonkey: https://addons.mozilla.org/en-US/firefox/addon/748
- Restart Firefox.
- Load page and click the Install this script button at the top.
- Greasemonkey will ask you to install the script. Choose Install.
Usage instructions:
- Go to Last.fm and sign in.
- Create a new playlist or view any user's playlist or tag.
- At bottom of page find the import/export options (import options are only shown for the signed in user).
- Select one of the options.
- Click the start button
- When the script finishes, the status / error area shows the tracks that could not be added. You can try to search for and add those manually.

