Reputation: 48018
I have songs in iTunes on my MacBook pro that I have rated from one-start to five-star. When I open the songs in my DJ software, it doesn't show the ratings because iTunes doesn't write them to the ID3 tag, but just keeps it within iTunes.
I have figured out that I can read the rating by doing this:
tell application "iTunes"
set songRating to get rating of current track
end tell
return songRating
Also, I can get the location by doing this:
tell application "iTunes"
set songLocation to get location of current track
end tell
return songLocation
How do now use the file path that I have to write the rating into the ID3 tag of the file?
Upvotes: 0
Views: 544
Reputation: 3292
You could set the comment tag to the rating, that should be readable in a 3rd party app.
e.g,
tell application "iTunes"
set comment of the current track to "rating:" & (get rating of current track)
end tell
Ratings are percentage values, i.e, 2 stars == 40.
Upvotes: 1