Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: iTunes Album Artwork Directory Structure

  1. #1
    Variable Bitrate NeonDev's Avatar
    Join Date
    Feb 2008
    Posts
    431

    iTunes Album Artwork Directory Structure

    so far this is the best information I have regarding the album artwork downloaded through the iTunes Download Album Artwork feature

    The problem is that the directory structure described is only true for the LOCAL subfolder (ie the one with the cache files for the songs with EMBEDDED art that NBB already supports)

    does anybody here know how to decipher the structure of the folder containing the downloaded artwork? its almost as if apple has encrypted something just to annoy me.

    here is what i can tell you (you will likely want to read the content in the above link):

    the track persistent id 9B04AB519C0A563C somehow corresponds to the file located at "Album Artwork/Download/'Library Persistent ID'/10/03/12/'Library Persistent ID'-AE8C30086A012C3A.itc"

    I only know that because i opened up that file (because it is the first one) extracted the image information with a hex editor and found the only song corresponding to that album art and got its ID. In the local directory the 2nd part of the hex string that makes up the itc file name is the track persistent id as you can prolly see 9B04AB519C0A563C /= AE8C30086A012C3A

    Why is it that the local folder has one structure and the download folder has a different one?
    check us out at: www.neonboombox.com

  2. #2
    Variable Bitrate NeonDev's Avatar
    Join Date
    Feb 2008
    Posts
    431
    a couple of farther observations:

    the .itc files are stored in the same order as in the itunes XML (as far as I can tell) ie the first file in the XML with downloaded album art corresponds to the itc file in the first folder of the downloaded art folder. I have checked this for 5 downloaded album arts and it is consistent.

    Also for me the folders start at 10 and go to 15 but each subfolder of those is 03 and each 03 subfolder is 12

    that still leaves me nowhere as far as NBB getting the downloaded art because I don't know how the hell itunes is deciding where to file the itc files.
    check us out at: www.neonboombox.com

  3. #3
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    My file structure in the Downloads folder has a hex ID (4CD651A28ED49D8) that precedes the persistent Track ID. In fact, all of the artwork is contained in a folder with that ID. (Download-->4CD651A28ED49D8). That's followed by the folders named 00 or 01 or 02 and so forth. Ultimately, it breaks down to an .itc file with the first Library persistent ID and what must be the track persistent ID.

    If the last part of the file name = the persistent ID, would it work to just search the iTunes Album Artwork folder for any file that has that Track persistent ID in the last part of the filename? Because it's such a long string, it is almost guaranteed to match.
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  4. #4
    Variable Bitrate NeonDev's Avatar
    Join Date
    Feb 2008
    Posts
    431
    that naming convention is only true for the local folder. the download folder SEEMS to follow except that it is not using the track persistent id (you can verify against that by looking at the itunes xml file)

    my only guess is that either the second hex string in the name is the ALBUM persistent id if there is such a thing (there is none in the XML file) or apple is purposely encrypting the track id in the download folder to make it hard/impossible for 3rd parties to access it.

    the thing that really ****es me off is that even finder know exactly how to find which itc goes to which song. once you delete the itc finder displays the generic icon so it must be reading that very file.

    Why must apple make it so hard? F*** DRM and F*** cover flow

    Does anybody know how apple generates these "Persistent IDs"?
    Has nobody else figured out how to use this album art?

    also why does apple even need to segregate the downloaded art versus the itc that was cashed using the embedded art?

    Its looking less and less likely that anybody is ever going to figure out the filing system behind the downloaded itc files and therefore less and less likely that NBB will ever support non embedded artwork. Luckily there are a number of apple scripts that will go through your library and embed the artwork for you. a pain in the a$$ i know but I don't know what else to tell people
    check us out at: www.neonboombox.com

  5. #5
    CarFrontEnd Creator iamgnat's Avatar
    Join Date
    Jul 2004
    Location
    NoVA
    Posts
    867
    Quote Originally Posted by NeonDev View Post
    the thing that really ****es me off is that even finder know exactly how to find which itc goes to which song. once you delete the itc finder displays the generic icon so it must be reading that very file.
    Am I remembering correctly that you are not using QT in NBB? I have to believe that Finder would be accessing the info via QT (the same way iTunes would) which would explain why it can see it.

    Have you checked the meta data for the file (mp3 tags, extended attributes, ...) to see if there is a custom key they are using to point it to the correct itc file?

    -dave
    My pathetic worklog.
    CarFrontEnd (now it's own sub-forum!!!!)

  6. #6
    Variable Bitrate NeonDev's Avatar
    Join Date
    Feb 2008
    Posts
    431
    I am using QT, and I have searched the contents of various mp3 and aac files for the 2nd hex string and came up short each time (i searched as both hex and ascii)

    I will go through the quicktime framework documentation to see if there is something related to artwork in there...

    Has no other dev here attempted this before? or are they safe guarding the secret?
    check us out at: www.neonboombox.com

  7. #7
    CarFrontEnd Creator iamgnat's Avatar
    Join Date
    Jul 2004
    Location
    NoVA
    Posts
    867
    Quote Originally Posted by NeonDev View Post
    I am using QT, and I have searched the contents of various mp3 and aac files for the 2nd hex string and came up short each time (i searched as both hex and ascii)
    Sorry, was remembering wrong then.

    Any chance the itc hex string is the MD5 hash of the file it belongs to or something like that?

    Have you tried doing a hex dump of the audio file and searching for the hex string (e.g. maybe it's just in a specific location but not attached to a tag)?

    Has no other dev here attempted this before? or are they safe guarding the secret?
    The last time I messed around with album artwork directly (e.g. CFE just pulls it from iTunes via AS) was before they implemented iTunes Plus and the free album art.

    -dave
    My pathetic worklog.
    CarFrontEnd (now it's own sub-forum!!!!)

  8. #8
    Variable Bitrate NeonDev's Avatar
    Join Date
    Feb 2008
    Posts
    431
    there is no chance that the second hex string is the hash of the file itself since, if you look at it, they are sequential. by that i mean the file in the folder structure 10->03->12 has the value 8C806EA192F99CA1-AE8C30086A012C3A.itc and the file in folder structure 11->03->12 has the value 8C806EA192F99CA1-AE8C30086A012C3B.itc even they are completely different songs. as I said before they go in order (the first track with downloaded art in the xml matches the itc in the first folder) when you look inside the xml file (as far as i can tell).

    Have you tried doing a hex dump of the audio file and searching for the hex string (e.g. maybe it's just in a specific location but not attached to a tag)?
    yes i opened several files with a hex editor and searched the file for both the hex and ascii representation of the string (even narrowed my search to the last 3 chars)

    if i only knew how apple is generating that second hex string. (which by the way is different in different libraries for the same EXACT song)
    obviously i am staunchly opposed to running itunes simply to grab album artwork, I would very much like to decipher their artwork database since grabbing the artwork from that would be even faster than getting the embedded art since NBB would no longer have to open the file and parse the tags.

    for anybody interested i found this apple script that will embed the downloaded album art

    tell application "iTunes"
    repeat with aTrack in selection
    repeat with anArtwork in artworks of aTrack
    if downloaded of anArtwork is true then
    set theData to data of anArtwork
    set data of anArtwork to theData
    end if
    end repeat
    end repeat
    end tell

    link to script
    check us out at: www.neonboombox.com

  9. #9
    CarFrontEnd Creator iamgnat's Avatar
    Join Date
    Jul 2004
    Location
    NoVA
    Posts
    867
    Quote Originally Posted by NeonDev View Post
    obviously i am staunchly opposed to running itunes simply to grab album artwork
    ...
    for anybody interested i found this apple script that will embed the downloaded album art
    If you aren't using iTunes for something else (e.g. playing the music), I would agree. As an alternative, you could offer the user the option to import the images directly to the files or into a format/location that NBB is happy with (e.g. run iTunes once, do the grunt work, then don't have to run it again unless they need to update the images).

    That can be slow though (AMP does this and is painful when updating your library).

    -dave
    My pathetic worklog.
    CarFrontEnd (now it's own sub-forum!!!!)

  10. #10
    Variable Bitrate NeonDev's Avatar
    Join Date
    Feb 2008
    Posts
    431
    That can be slow though (AMP does this and is painful when updating your library).
    that is why i am trying painfully hard to avoid any importing... I've got to say its really frustrating to have everything I need right in front of me but having no idea how to access it in a reasonable manner
    check us out at: www.neonboombox.com

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 69
    Last Post: 06-16-2008, 12:44 PM
  2. Album Artwork...Searched but can't find an answer...
    By Shamingo in forum Road Runner
    Replies: 20
    Last Post: 09-16-2007, 11:30 PM
  3. Indexing music in 1.0.9.8 Failed
    By hovalistic in forum StreetDeck
    Replies: 0
    Last Post: 07-07-2007, 12:19 PM
  4. Album art downloader
    By hijinks21 in forum Software & Software Development
    Replies: 105
    Last Post: 07-20-2006, 10:56 AM
  5. Replies: 18
    Last Post: 03-12-2006, 06:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •