If you view an artist in the iPod's menu system it shows you their albums, and any compilation albums they feature on, sorted alphabetically. I wanted to see the albums sorted by release date (Year tag) and I also wanted to separate each artist's main albums from the compilations. This tool achieves that by setting adjusting the SortAlbum tags in iTunes which in turn change the way the iPod menus display things.
This tool only works with the Windows version of iTunes since it uses the iTunes COM SDK. What it does is very simple so someone who knows AppleScript could easily write an equivalent for OS X.
Note that iTunes (but not the iPod) can already sort albums by year without the use of this tool (click the Album column header a few times until it changes to "Album by Year"). This tool only exists to get something similar on the iPod.
I have these Radiohead albums on my iPod:
(1993) Pablo Honey (1995) The Bends (1997) OK Computer (1998) Airbag - How Am I Driving (2000) Kid A (2001) Amnesiac (2001) I Might Be Wrong - Live Recordings (2003) Hail To The Thief (2007) In Rainbows
I also have two compilation albums featuring tracks by Radiohead:
(1996) Romeo + Juliet (2005) Help - A Day In The Life
Before using iPodYearSort, if I selected Radiohead on my iPod I would have seen this list:
Airbag - How Am I Driving Amnesiac The Bends Hail To The Thief Help - A Day In The Life I Might Be Wrong - Live Recordings In Rainbows Kid A OK Computer Pablo Honey Romeo + Juliet
The albums were sorted alphabetically and compilations were mixed in with proper albums.
After running iPodYearSort, the Radiohead menu will look like this:
Pablo Honey The Bends OK Computer Airbag - How Am I Driving Kid A Amnesiac I Might Be Wrong - Live Recordings Hail To The Thief In Rainbows Romeo + Juliet Help - A Day In The Life
Everything in its right place. When Radiohead release their next album it will appear at the end of the main list (just before the compilations start), rather than in an arbitrary place depending on what they decide to call it. If I buy more compilations that feature Radiohead then they won't get in my way when I'm trying to decide which of their proper albums to play.
Both iTunes and the iPod support a tag called SortAlbum. The value of this tag is never displayed but, if it isn't blank, the value will be used instead of the actual album title when sorting the list. Similar sorting tags exist for things list artist names. A typical example, which iTunes configures automatically, is if you add a song by The Beatles. The Artist tag will be "The Beatles" but the SortArtist tag will be set to "Beatles". The band appear under B, rather than T, but are still called The Beatles.
The iPodYearSort tool creates SortAlbum tags in this format:
For example, the albums Under The Pink (released in 1994) and American Doll Posse (released in 2007) would have their respective SortAlbum tags set to:
1994 Under The Pink 2007 American Doll Posse
This means that the older album will come before the newer album, even though their album titles sort the other way around.
If an album's AlbumArtist tag starts with "Various" then the tool assumes it is a compilation album. A slightly differnet SortAlbum format is used in this case:
9999 <Year> <Title>
This makes compilations come after proper albums.
(iTunes has a special tag "Part of a Compilation Album" but, unfortunately, the tool cannot detect this tag as it is not supported by the iTunes COM SDK. This is why the tool checks for AlbumArtist tags that start with "Various" instead.)
iPodYearSort is a very simple tool that can only be run from a Command Prompt. There is no fancy GUI interface, sorry.
From a Command Prompt you can run one of the following commands:
You are strongly recommended to use the Pretend modes before doing any changes for real. This will alert you to any errors (e.g. if your tracks don't have Year tags) and will give you a better idea of exactly what is about to happen before it's too late.
After you have written changes to your tags you will need to sync your iPod. Unfortunately, the first time you use the tool will trigger a complete re-sync of all affected files, including the actual music data, even though only the tags have changed.
Whenever you add new music to your library you should run the tool again so that the new files' tags are updated. The tool will only update the new files so you do not have to worry about changes to old files causing them to be re-synced.iPodYearSort_1001.zip (62KB) (PGP sig)
The program is standalone exe file and does not require any installation or uninstallation. It doesn't write any configuration data or modify anything other than the iTunes library tags.
The zip file includes a Source directory containing C++ source code. If you are not a programmer then you can ignore/delete it.
Be sure to read the Usage section because the tool does not have a user-friendly UI!
Version 126.96.36.199 (20th October 2007)