[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
Christopher Snowhill 2022-06-17 17:25:42 -07:00
parent e9b02d54f4
commit 4b4776fbc0
1 changed files with 2 additions and 2 deletions

View File

@ -1112,9 +1112,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
NSPredicate *searchPredicate;
if([album length] > 0)
searchPredicate = [NSPredicate predicateWithFormat:@"album like %@", album];
searchPredicate = [NSPredicate predicateWithFormat:@"album == %@", album];
else
searchPredicate = [NSPredicate predicateWithFormat:@"album == nil || album like %@", @""];
searchPredicate = [NSPredicate predicateWithFormat:@"album == nil || album == %@", @""];
NSCompoundPredicate *predicate = [NSCompoundPredicate andPredicateWithSubpredicates:@[deletedPredicate, searchPredicate]];