iTunes Hints & Tips
Audiobooks on iPods
With iTunes 8 or later you have the option to tell iTunes to treat any audio file as an audiobook. Simply select the tracks, Get Info., then on the options tab set Media kind to Audiobook. You can also set options to Remember playback position and Skip when shuffling. If your audiobook comes on multiple CDs then you may want to link them together as a single book/album using the technique One cover for multi-disc album. Use other sections from Grouping tracks into albums if iTunes still won't treat the audiobook as a single item.
Assuming that your audiobook consists of more than one file, however, you may have problems if you plan to listen to it on an iPod. The Audiobooks feature was originally designed for books that have been stitched up into a single file and hasn't been updated to reflect the changes that make multi-track audiobooks easy to work with in iTunes. The main issue is that the iPod lists all audiobook files by track title/chapter name so unless you rename every track using a scheme such as Book Title, Chapter XX the tracks will play out of sequence. There are tools for creating iPod-friendly audiobooks for which Aldo on Audiobooks is probably the best reference. Personally I don't bother with the extra effort and just have an "Audiobooks" playlist folder containing sub-folders for each author and within these playlists for each audiobook. Although I still mark the files as Audiobooks to keep them out of my main music section when it comes to the iPod I ignore it's Audiobooks feature and use my own playlists for access.
N.B. To get nested playlist folders on the device you must sync and not manually manage it.
Note that I've used leading digits in the playlist names to arrange these in chronological/series order rather than alphabetical order.
Although the scheme above has served me well for some time I noticed that the parts of each book are listed out of sequence in the Books tab when a device is connected. It occurred to me that I could write a script to set the Sort Name for each track so that the parts are listed in the correct sequence which should also make them play properly on an iPod if accessed via the Audiobooks menu instead of a dedicated playlist. The result is a pair of scripts called AudiobookSortName which sets suitable sort names for selected tracks and ClearSortName which undoes any changes should it be desired. The images below show the effect of the script.
Note, to ensure that the correct number of padding zeros are inserted into the generated Sort Name you should make sure that the disc counts are set if there are more than 9 discs in the audiobook and the track counts are set if there are more than 99 tracks on any given disc.
Incidentally, the correctly ordered sequence of book titles above is achieved by setting the Sort Album values to Sherlock Holmes 01, Sherlock Holmes 02 etc.