[Shuffle Function] Make album predicate exact
Make the album match predicate an exact match, rather than using the "like" operator, in case there's a speed up from doing so. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
e9b02d54f4
commit
4b4776fbc0
|
@ -1112,9 +1112,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
||||||
|
|
||||||
NSPredicate *searchPredicate;
|
NSPredicate *searchPredicate;
|
||||||
if([album length] > 0)
|
if([album length] > 0)
|
||||||
searchPredicate = [NSPredicate predicateWithFormat:@"album like %@", album];
|
searchPredicate = [NSPredicate predicateWithFormat:@"album == %@", album];
|
||||||
else
|
else
|
||||||
searchPredicate = [NSPredicate predicateWithFormat:@"album == nil || album like %@", @""];
|
searchPredicate = [NSPredicate predicateWithFormat:@"album == nil || album == %@", @""];
|
||||||
|
|
||||||
NSCompoundPredicate *predicate = [NSCompoundPredicate andPredicateWithSubpredicates:@[deletedPredicate, searchPredicate]];
|
NSCompoundPredicate *predicate = [NSCompoundPredicate andPredicateWithSubpredicates:@[deletedPredicate, searchPredicate]];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue