iTunes Ratings now support half-stars

I updated to iTunes 6.0.2, and looky what I found: Now, the trick is that it needs to be exactly 10, 30, 50, 70 or 90 in order to be a half-star. A rating of 75 will still appear to be three stars. I think this is a bug. I’ve written some code that does it better:

 1     property star : «data utxt2605» as Unicode text
 2     property half : «data utxt00BD» as Unicode text
 3     property quarter : «data utxt00BC» as Unicode text
 4     property threeq : «data utxt00BE» as Unicode text
 5     
 6     on myRating(theRating)
 7      set theResult to ""
 8      repeat 5 times
 9          if theRating > 20 then
10              set theResult to theResult & star
11          else if theRating > 15 then
12              set theResult to theResult & threeq
13          else if theRating > 10 then
14              set theResult to theResult & half
15          else if theRating > 5 then
16              set theResult to theResult & quarter
17          end if
18          set theRating to theRating - 20
19      end repeat
20      return theResult
21     end myRating

I’m currently using this to get the ratings data to add to my blog posts: at the moment it’s a FastScript that just inserts the data via the clipboard, but when Blogsome gets XMLRPC working again, it will be an ecto script.

It’s Still Rock And Roll To Me • Billy JoelGreatest Hits ★★¼

blog comments powered by Disqus