LastFM2Itunes Perl Script

UPDATE VERSION V0.65 (MAY-2014)

lastFM2Itunes is a perl script that updates iTunes tracks play count and play date with last.FM tracks information.

File

download latest version

What the script does

  • parses your lastFM data
  • looks for matching tracks in your iTunes library based on Artist/Song
  • if track found it updates the iTunes play count only if it is less than the last.FM one. Update the last play date too.
  • if enabled, data can be saved into a csv file

Requirements

Manual

Tutorial: step by step tutorial with screenshots (PDF) [How to install Perl, and use the script]

  • open a command line shell to run a perl script
  • run "perl lastFM2Itunes.pl lastFMusername [t DD MM YYYY,v,csv filename]"
    • user: your lastFM account name. (mandatory)
    • t DD MM YYYY: (optional) enable to specify a starting date to begin the import (ie: 'perl lastFM2Itunes.pl lebios t 15 02 2008', to export my data from 15/02/2008)
    • v: (optional) enable verbose mode
    • csv: (optional) write data to csv file. In this case iTunes is not updated and verbose is on
      • provide a valid filename to save
    • sample: perl lastFM2Itunes.pl lebios csv lebios.csv > lebios.log
      this will poll all my profil info and copy them into lebios.csv file. Also the command line output will be written on lebios.log file and not on the screen

Origin of the script

Recently I lost my iTunes library and so had to rebuild it from scratch. That's not a big deal, but several of my smart playlists based on play count were useless since all the tracks count has been reset to 0.
On the other hand I always synchronised my iTunes with my lastFM account. So my tracks play counts were available there.

Contact

For any question (how to use the script), any problem, any wanted evolutions do not hesitate to contact me here.

Lionel Grenier

AttachmentSize
lastFM2iTunesManual.pdf443.88 KB
lastFM2Itunes.V0.65.zip6.64 KB

About the Author

Donate

If you've liked this free application, you can donate via Paypal, or you can get me (lebios) a Last.fm subscription.









Counter

  • Site Counter: 9087
  • Unique Visitor: 3251
  • Published Nodes: 53
  • Since: 2008-10-01

Countries

free counters

User login