Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Set or clear arbitrary song ratings in iTunes Apps
One annoying thing about the rating system in iTunes is the inability to totally remove ratings from a song. Use the following AppleScript to pop up a dialog box that will allow you to set the rating of the current song to any value between 0 and 100. Set the rating to 0 (or use the button) to remove the rating.

Grab the compiled script here. Just save the script in your ~/Library -> iTunes -> Scripts folder and it will appear in the script menu of iTunes. For those that are interested, here's the source to the script.

[Editor's note: I've pasted the source into the body of this article as well, in case the referenced site isn't available.]

Paste into Script Editor:
tell application "iTunes"
set art to artist of the current track as string
set trackname to name of the current track as string
set thisalbum to album of the current track as string
set thisrating to rating of the current track as string
set vol to volume adjustment of the current track as string
set newrating to thisrating
set button_pressed to ""
display dialog "Artist: " & art & "
Track: " & trackname & "
Album: " & thisalbum & "
Volume Adjustment: " & vol default answer newrating ¬
buttons {"OK", "Cancel", "Reset Rating"}
copy the result as list to {the newrating, the button_pressed}
try
set newrating to newrating as integer
on error
display dialog "Not a valid rating"
set newrating to thisrating
end try
if the button_pressed is "Reset Rating" then
set the rating of the current track to 0
end if
if the button_pressed is "OK" then
if newrating is not "" then
set the rating of the current track to newrating
else
display dialog "rating unchanged"
end if
end if
end tell
    •    
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[10,077 views]  

Set or clear arbitrary song ratings in iTunes | 13 comments | Create New Account
Click here to return to the 'Set or clear arbitrary song ratings in iTunes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Manual rating removal
Authored by: pbx on Dec 03, '02 10:41:08AM

The stars work like a slider. To clear a rating, click in the song's "My Rating" area and drag to the left.



[ Reply to This | # ]
Manual rating removal
Authored by: 8ighteen Acres on Dec 03, '02 02:04:01PM

Thanks pbx! This has been bugging me since... well, a while!



[ Reply to This | # ]
Manual rating removal
Authored by: paulsab on Dec 03, '02 07:59:57PM

I never noticed that it worked like a slider. :-)

Oh well, at least with the script you can set the value to anything from 0 to 100 if you are picky about things like that.



[ Reply to This | # ]
I can remove ratings, you too?
Authored by: julez-rocca on Dec 03, '02 10:48:35AM

What do you mean, you can“t remove ratings?
If you choose a song or more from the MainLibrary or a playlist an then choose "got Info" on the third tab "options" you CAN remove any rating. Just click in the very left area of the "my rating" field, voila all stars just disappear.
Hope this helps and since I“m german hope your iTunes-options are named the same.



[ Reply to This | # ]
iTunes already does this--don't need Applescript
Authored by: chabig on Dec 03, '02 10:53:28AM

You don\'t need an Applescript to take away the stars.

You may not realize that the iTunes star rating column is draggable. You aren\'t limited to just clicking on the stars. You can click and drag--the stars will increase or decrease as you drag. To take away all stars, click and drag all the way to the left.

Chris



[ Reply to This | # ]
The rating issue is moot, but...
Authored by: GORDYmac on Dec 03, '02 02:44:40PM

How about an AppleScript to increase/decrease the play count?



[ Reply to This | # ]
The rating issue is moot, but...
Authored by: paulsab on Dec 03, '02 08:20:03PM

For some reason played count is a read only value to AppleScript... I'll poke around some more because this is something that I'd like to change as well.



[ Reply to This | # ]
The rating issue is moot, but...
Authored by: chabig on Dec 04, '02 02:10:33PM

Just curious, why do you want to increase/decrease the play count?



[ Reply to This | # ]
The rating issue is moot, but...
Authored by: GORDYmac on Dec 19, '02 11:53:58AM

Some of my smart playlists are based on Play count. So, if there is a song with a very low count, I'd like to increase it. Currently, you'd have to play the song ad nauseaum to do it. Conversly, if there is some song I'm sick of, I'd like to reduce it.



[ Reply to This | # ]
more Rating fun
Authored by: DougAdams on Dec 03, '02 03:02:27PM
I've posted the text of a couple of applets to raise and lower the rating of the currently playing track here. Doug Doug's AppleScripts for iTunes

[ Reply to This | # ]
son of more Rating fun
Authored by: DougAdams on Dec 04, '02 08:05:02AM
By the way, ratings take a value between 0 and 100, as mentioned above; however, a star value is a factor of twenty: 1 star = 20, 2 stars = 40, etc. Values are rounded up to the nearest 20 (there are no "half-stars" - yet!). Doug Doug's AppleScripts for iTunes

[ Reply to This | # ]
more Rating fun
Authored by: stewby on Dec 04, '02 08:50:00AM

Or you could just use the iTunes dock contextual menu, which lets you give the current song a rating directly.



[ Reply to This | # ]
play count
Authored by: paulsab on Dec 04, '02 02:21:27PM

For me I'd like to decrease the play count of some songs that were in a playlist that was set to repeat and got left on while I wasn't in the room listening.

This messed up some dynamic lists I have that make a CD's worth of songs using play count as one of the criteria.



[ Reply to This | # ]