From c5d3bc51dcbad41386ee22ddd5fad78e485d5646 Mon Sep 17 00:00:00 2001 From: Adrian Ulrich Date: Tue, 13 Oct 2015 21:54:39 +0200 Subject: [PATCH] fix crash while searching on a genre limiter The old regexp failed to prefix cols in such a query: > .... AND artist_key||album_key||title_key LIKE ?) We fix this by including the pipe character and matching words (instead of non-spaces) --- src/ch/blinkenlights/android/vanilla/MediaUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch/blinkenlights/android/vanilla/MediaUtils.java b/src/ch/blinkenlights/android/vanilla/MediaUtils.java index 9e2bddd9..d4def84d 100644 --- a/src/ch/blinkenlights/android/vanilla/MediaUtils.java +++ b/src/ch/blinkenlights/android/vanilla/MediaUtils.java @@ -208,7 +208,7 @@ public class MediaUtils { // which shares some columns with audio. // This regexp should matche duplicate column names and forces them to use // the audio table as a source - final String _FORCE_AUDIO_SRC = "(^|[ ,\\(])(_id|album(_\\S+)?|artist(_\\S+)?)"; + final String _FORCE_AUDIO_SRC = "(^|[ |,\\(])(_id|album(_\\w+)?|artist(_\\w+)?)"; // Prefix the SELECTed rows with the current table authority name for (int i=0 ;i