I would like to add a series of predicates to an MPMediaQuery
, but I want it aggregated using OR, not AND:
MPMediaQuery *q = [MPMediaQuery songsQuery];
NSMutableArray *a = [@[] mutableCopy];
for (DFLocalMediaItem *item in self.offlineItems) {
MPMediaPropertyPredicate* p = [MPMediaPropertyPredicate predicateWithValue:item.identifier
forProperty:MPMediaItemPropertyPersistentID];
[a addObject:p];
}
NSSet *s = [NSSet setWithArray:a];
[q setFilterPredicates:s];
when I create this set, it's aggregating the above MPMediaPropertyPredicate
using AND (which won't work obviously.. since a single MPMediaItem will obviously have a single identifier)
ideas?