iTunesToRhythm

This little piece of insanity is a tool that transfers your ratings and playcounts between various players (iTunes, RhythmBox, and Amarok). Supports two-way synchronization in iTunes Mac, RhythmBox, Amarok, and Windows Media Player


Prerequesites:

If you are running a desktop distribution of linux (such as Ubuntu), you probably already have these installed.

Execution:

  1. Download the source and put it somewhere somewhere (now forked in a dedicated github repo):
  2. Move/copy/mount all your music where RhythmBox or Amarok can find them (the folder structure doesn't matter)
  3. Import all your music into your new player (amarok or rhythmbox)
  4. Copy or mount your "iTunes Music Library.xml" file to linux, if copying from itunes.  If going to/from amarok or rhythm, ignore this step
  5. Execute the following command: iTunesToRhythm.py -w -a ITunes\ Music\ Library.xml ~/.local/share/rhythmbox/rhythmdb.xml
  6. Manually resolve any ambiguities your are prompted for
  7. Enjoy your music
  8. Note: if running this tool on a Mac, iTunes is directly supported by using "itunes" as the source or destination.  One could for instance, import from amarok directly into ituns on a Mac. On Windows, Windows Media Player is supported by using "wmp" as the source or destination.

Examples:

Copy statistics from RhythmBox to an Amarok mysql database, excluding ratings:

iTunesToRhythm.py --noratings -a ~/.local/share/rhythmbox/rhythmdb.xml mysql -s musicserver -d amarok -u amarokuser -p verysecret

Copy ratings and playcounts from Amarok to itunes on a Mac
iTunesToRhythm.py mysql -s musicserver -d amarok -u amarokuser -p verysecret itunes

Usage:

Usage: iTunesToRhythm [options] <inputfile>|mysql|itunes|wmp <outputfile>|mysql|itunes|wmp

Options:
  -h, --help          show this help message and exit
  -c, --confirm       confirm every match
  -w, --writechanges  write changes to destination file
  -a, --disambiguate  prompt user to resolve ambiguities
  -l, --fastandloose  ignore differences in file names when a file size match is made against a single song. Will not resolve multiple matches
  --noplaycounts  do not update play counts
  --noratings  do not update ratings
  --twoway  sync up the two files, giving precedence to the items with the higher playcount
  --dateadded  update dates (only iTunes to Rhythmbox on Linux)

  Amarok connection options:
   Options for connecting to an Amarok MySQL remote database

   -s SERVERNAME, --server=SERVERNAME
      host name of the MySQL database server
   -d DATABASE, --database=DATABASE
      database name of the amarok database
   -u USERNAME, --username=USERNAME
      login name of the amarok database
   -p PASSWORD, --password=PASSWORD
      password of the user

Speciifying "itunes" will attempt to use a running iTunes instance for synchronization (Mac Only)

Roadmap:
  1. Client-server support
  2. Playlist synchronization
Contact info: