“Purple Rain” Booster: Lowers iTunes Ranking By One Star For Every Other Album

Shared By: Justin

Description

I saw a tweet that made me laugh:

“I’ve run out of stars to rate “Purple Rain” in iTunes. Need to write an applescript that will lower all other albums by one star.”

I couldn’t agree more with @sugarfreejones, so here’s that script! It will lower every non-”Purple Rain” album in your current view/window/playlist by one star!

And for those with different tastes, just type in the name of your favorite album in its place. (sigh)

The Code

tell application "iTunes"
    set currentList to view of front window
    set rating_change to 20
    repeat with curTrack in (get every track of currentList)
        if rating of curTrack is greater than rating_change then
            if album of curTrack does not contain "Purple Rain" then
                set rating of curTrack to (rating of curTrack) - rating_change
            end if
        end if
    end repeat
end tell

You can use these tags in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>