I have an application that parses the iTunes library using the iTunes Library XML file generally found in the root of the iTunes library location. Finding the library is not an issue. The issue is that as of at least iTunes 11.1.4 (possibly earlier), Apple changed the storage location of retrieved art. The path used to be well known and predictable:
~/Music/iTunes/Album Artwork/Cache/<LibraryID>/<A>/<B>/<C>/<LibraryID>-<TrackID>.itc
where
<LibraryID>
is the library persistent ID
<TrackID>
is the track's persistent ID
<A>
is the decimal value of the last Hex character in the <TrackID>
<B>
is the decimal value of the second to last Hex character in the <TrackID>
<C>
is the decimal value of the third to last Hex character in the <TrackID>
The new process has some of the same attributes. <A>
, <B>
, and <C>
are still the last three characters of the ID, but the ID is no longer the <TrackID>
. What's even more interesting is that the art is stored in a different place each time it is retrieved. That is, the new ID for a given album is different each time, resulting in a different folder. The folder is still predictable if the ID is known, but the ID seems random.
I've spent quite a bit of time in hex editors trying to find anything distinguishing about the art files, but there doesn't seem to be anything that links them back to the albums they are for. Short of ripping apart the iTunes application, does anybody have any thoughts on this issue?
It looks like the more recent versions are back to this format, so....problem solved.