I noticed that setting new nowPlayingInfo
of [MPNowPlayingInfoCenter defaultCenter]
replaces MPMediaItemPropertyArtwork
value every new perform setNowPlayingInfo:
. But in standart iphone music.app it doesn't happend! So how to set nowPlayingInfo
retaining old artwork?
NSMutableDictionary *mediaInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:recording.releaseGroup.title, MPMediaItemPropertyAlbumTitle, recording.releaseGroup.artist.title, MPMediaItemPropertyArtist, recording.title, MPMediaItemPropertyTitle, recording.lyrics, MPMediaItemPropertyLyrics, itemsCount, MPMediaItemPropertyAlbumTrackCount, itemNumber, MPMediaItemPropertyAlbumTrackNumber, nil];
self.artwork = [[[MPMediaItemArtwork alloc] initWithImage:_coverView.image] autorelease];
[mediaInfo setValue:_artwork forKey:MPMediaItemPropertyArtwork];
[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:mediaInfo];
This block is executed every change of track is playing