سؤال

i have an app that gets the album artwork using SBApplication. I had this code:

NSImage* albumArtwork;
iTunesArtwork *artwork = (iTunesArtwork *)[[[[iTunes currentTrack] artworks] get] lastObject];
albumArtwork = artwork.data;

Now, with the latest iTunes 11.1.5 the artwork variable is always nil. I tried different approaches to read the album artwork, but nothing works.

Doses anyone know what is going on?

هل كانت مفيدة؟

المحلول

The solution to the problem is as follows.

iTunesArtwork *artwork = (iTunesArtwork *)[[[[iTunes currentTrack] artworks] get] lastObject];
albumArtwork = nil;

if(artwork) 
{
    albumArtwork = artwork.data;
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top