0

i am trying to store multiple song in mpplayer that are being fetch from database having song persistent id..but only single song is being added .here is what i am doing

MPMediaQuery *query = [MPMediaQuery songsQuery]; MPMediaPropertyPredicate *predicate = [MPMediaPropertyPredicate predicateWithValue:persistentId forProperty:MPMediaItemPropertyPersistentID]; [query addFilterPredicate:predicate]; NSArray *mediaItems = [query items]; //this array will consist of song with given persistentId. add it to collection and play it MPMediaItemCollection *col = [[MPMediaItemCollection alloc] initWithItems:mediaItems]; ///.... [col release];

thanks in advance

Regards devon smith

devonsmith
  • 123
  • 2
  • 11

1 Answers1

0

Are you sure that the PersistentID represents more that 1 track? I use a Persistent ID for each separate track in the album.

John Goodstadt
  • 678
  • 8
  • 13