Jump to content

Workflow to Populate iTunes Track Comments

Recommended Posts

As a backup feature to how finicky iTunes can be, I store the song ratings in the Comments tag for each track.  I've figured out how to create a workflow that gives a track a star rating based on a hotkey, but there is no option to also populate the Comments field.  For instance, if I give a track a 4 star rating then I want to store "4 Star" in the comments field.  Does that require an applescript?  If so, can someone guide me through that process.  I'm not a techie (at this).



Link to comment

You can get/set ratings, comments and most track metadata with AppleScript. To get you started, this script will get the rating of each selected track, calculate the number of stars (ratings are 0–100) and print the output to AppleScript Editor's Event Log:


tell application "iTunes"
	repeat with the_track in selection
		set the_rating to the_track's rating
		if the_rating is greater than 0 then
			set the_stars to the_rating / 20
			set the_stars to 0
		end if
		log the_track's name & " rating : " & the_rating & " (" & the_stars & " stars)"
	end repeat
end tell
Some example output:

(*Disco Stomp rating : 20 (1.0 stars)*)
(*Ma Baker rating : 0 (0 stars)*)
(*I Don't Like Mondays rating : 60 (3.0 stars)*)
(*Nobody Does It Better rating : 80 (4.0 stars)*)
(*Le Freak rating : 80 (4.0 stars)*)
Edited by deanishe
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...