Advanced Sorting in iTunes


As it stands, the ability to sort one’s music in iTunes is a bit limited. True for most purposes, the built-in sort possibilities – sort by any other field (year, song title, genre, what have you) and the results are sorted within each discrete entry by artist and then album title – address the most common situations. But it is easy to imagine sensible and interesting ‘sorts’ that cannot be performed on one’s whole library quickly, such as:

  • sorting by year and then by notes or grouping, in which Billboard chart numbers have been entered, to produce a Billboard chart of one’s library.
  • sorting by artist and then by year to see a chronological listing of an artist’s work
  • etc.

Any database or spreadsheet could easily perform the sorts of sorts envisioned, but iTunes, which in respect of its library is a sort of a database, cannot. Exporting the library from iTunes would allow the sorts to be done on a one-off basis with a bit of work, but it can’t be done in iTunes.

Regards,
Nick Chapman




codepoet Well, that’s kind of a doozy, really, because it’s more of a feature request for iTunes than something you can remedy. But, it’s not impossible. You simply have to resort to a trick used by programmers everywhere and create a sort key based on your sortable values. In this case, you would use AppleScript.

Find a tag you don’t use in any of your songs (grouping, comments, genre, etc.) and accept that you never will use it again, except for sorting. Then do something like this:

tell application “iTunes”



set theSongs to the selectionGet the selected tracks

repeat with theSong in theSongs



set theKey to ((the year of theSong as text) & “ “ & the name of theSong)

set the comment of theSong to theKey



end repeat



end tell


Anonymous said

how do i do a find, or sort, or search, for recent downloaded songs in iTunes? i would like to be able to do this by date. i.e. “find songs downloaded after 9/17/07”

thanks to any of you that already figured this out…please share.

Anonymous said

You could create a smart playlist (File -> New Smart Playlist…) and use the “Date Added” filter and select “is after” and then enter your date.

CyclotronX's picture

I use my comment tag to put in key words like MIXCD2006v1. Then I make a smart playlist to group those. Using “contains” allows me to put multiple keywords per song. Idont really understand the differnce in Grouping.

One problem with dates is that when I imported all my CDs a few years ago, the date wasn’t part of the info. A second problem with dates I noticed on iTMS is that the data is often the date of the current release, not when the album came out. Anything before CDs is often misdated. Plus those that were re-released.

Syndicate content