I need to fetch cached cover art from iTunes. Currently I'm working with the scripting bridge, but it only fetches covers that are embedded in the tracks. I've also tried this method here
Fetch iTunes album artwork without iTunes running
but it seems to be broken (at least in iTunes 9.2). Any hints how to solve this?
Regards, Erik
Update
NSArray *artworks = [[t开发者_如何学JAVArack artworks] get];
for (CMTunesBridgeArtwork *art in artworks) {
ref.image = [art data];
break;
}
In order to work around this issue i solved it as follows:
If a track doesn't provide artwork, I search the other album tracks for any artwork. In most cases at least one track has a cover applied. Weird but works.
As a third option I'll parse the cover cache (.itc) files and use artwork from there, but it turned out in almost all cases these cache files are useless, so i only use the first method now.
Regards, Erik
精彩评论