Skip to content

Latest commit

 

History

History
41 lines (36 loc) · 1.49 KB

README.md

File metadata and controls

41 lines (36 loc) · 1.49 KB

itunes-ratings-transfer

Transfer star ratings from an old iTunes Media Library to a new one (i.e. between XML files).

This script takes an old iTunes XML library file, looks at ratings, and creates a new file containing separate playlists for all tracks at one star, two stars, three stars, etc. The new playlist file can then be imported into iTunes and used to rate the same tracks in the new library en masse.

Originated from work in a gist relating to a blog post by Reinout van Rees.

Modified by Haydn Williams to ignore new ratings and just import all old ratings from the old library.

Note that the .xml file generated by Python 2.7.6 doesn't quite seem to work with iTunes 12.2.0.145, so you may need to export an existing Playlist from iTunes and then manually edit the first few lines of XML to ensure that they match what iTunes currently generates. The file should import fine after that though.

Output looks something like this:

MyName$ python update_ratings.py 
Calculating...
Found 10754 old tracks.
Found 10725 old ratings.
Found 9869  current tracks.
Skipped 163 tracks.
Rating: 0 stars - 1388 tracks
Rating: 1 stars - 1119 tracks
Rating: 2 stars - 2026 tracks
Rating: 3 stars - 2692 tracks
Rating: 4 stars - 2183 tracks
Rating: 5 stars - 298  tracks
Writing new playlist(s) to updated.xml...
Finished!
MyName$