Rename The Complete U2 album collection

Jan 05, '05 09:26:00AM

Contributed by: Anonymous

For Christmas, I bought my wife The Complete U2 from the iTunes Music Store. It's great, but the albums are all named in the format "The Complete U2 - Real Album Name." This is especially annoying because the iPod's screen is exactly wide enough to show "The Complete U2," but not the real album name.

So to ease listening, and to make iTunes' duplicate-finding feature work, I whipped up the following AppleScript. It sets the album to the original album title, and sets the Grouping to "The Complete U2." Oddly, the original files have the exact opposite settings, so the script really just switches them around. If others out there are wondering why the songs are marked in such a way, this script and four or five minutes of your time will stop the questions!

property oldPrefix : "The Complete U2 - "

on run
  tell application "iTunes"
    set theCompleteU2 to every track of playlist ¬
     "Library" whose album starts with oldPrefix
    log (count of theCompleteU2)
    repeat with eachSong in theCompleteU2
      set realAlbum to eachSong's grouping
      set eachSong's album to realAlbum
      set eachSong's grouping to "The Complete U2"
    end repeat
  end tell
end run
[robg adds: I haven't tested this one yet, as I haven't convinced myself to spend the cash on the whole U2 collection...]

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050103125706120