From 4b4776fbc0e56e1ad284bcf64a4ab4830bbe1b90 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 17 Jun 2022 17:25:42 -0700 Subject: [PATCH] [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 --- Playlist/PlaylistController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index 26375e1cc..eb37ce0dd 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -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]];