I'm trying to replicate the iOS music app's audiobook functionality.
I want to query all audiobooks in the iPod library. It shouldn't show each individual part but should show each book. Tapping a book should then show the parts inside it.
I've tried using [MPMediaQuery audiobooksQuery];
but that just seems to fetch all individual parts.
I've also tried:
MPMediaPropertyPredicate *abPredicate =
[MPMediaPropertyPredicate predicateWithValue:[NSNumber numberWithInt:MPMediaTypeAudioBook]
forProperty:MPMediaItemPropertyMediaType];
MPMediaQuery *abQuery = [[MPMediaQuery alloc] init];
[abQuery addFilterPredicate:abPredicate];
but that does the same thing.
This is my code