Skip to content

How to sync my mp3 Songs rating in iTunes across multiple Libraries

By now, I havn’t find any good solution to share my mp3 across multiple systems and disks. I’ve some on my local machine, some at work and some on my external harddisk to archive. Luckily, when copying my tracks to another library duplicates are ignored. But what annoys me most is that my ratings don’t get copied, as iTunes doesn’t store it within the file. Some while ago I found a solution by storing the number of stars into the ‘Grouping’ Field, so I can recover the rating afterwards. Now, I came up with this little applescript do automate the write and recover process. Just run this script, copy you mp3 to the other library, run the script again, and voilá, you ratings are back - nice!

[shell]
(* small apple script to save rating into grouping field and
vice versa. Perfect to persitent store your rating witin the file
*)

tell application “iTunes”
repeat with stars from 1 to 5
set rating_value to stars * 20
set group_name to “” & stars & “ Stars”

set sel to (every track whose rating is rating_value and grouping is “”)
repeat with aTrack in sel
tell aTrack
set grouping to group_name
end tell
end repeat

set sel to (every track whose rating is 0 and grouping is group_name)
repeat with aTrack in sel
tell aTrack
set rating to rating_value
end tell
end repeat
end repeat
end tell
[/shell]

Btw. for each Star rating I do have a smart playlist which allows me to find those quickly.