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:
- Rhythmbox, Amarok, Windows Media Player, or iTunes
- Python
- libxml2
- python-libxml2 (Python bindings for libxml2)
- MySQLdb python bindings (If using Amarok)
- pywin32 (If using Windows Media Player)
- appscript (If using iTunes on a Mac)
If you are running a desktop
distribution of linux (such as Ubuntu), you probably
already have these installed.
Execution:
- Download the source and put it somewhere somewhere (now forked in a dedicated github repo):
- Move/copy/mount all your music where RhythmBox or Amarok can find
them (the
folder structure doesn't matter)
- Import all your music into your new player (amarok or rhythmbox)
- 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
- Execute the following command: iTunesToRhythm.py
-w -a ITunes\ Music\ Library.xml ~/.local/share/rhythmbox/rhythmdb.xml
- Manually resolve any ambiguities your are prompted for
- Enjoy your music
- 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:
- Client-server support
- Playlist synchronization
Contact info:
- Bug reports should be emailed to douglas@esanbock.com