mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-29 05:19:05 -05:00
[smartpl] Add ESCAPE to LIKE queries where the value contains % and _
Plus various minor improvements
This commit is contained in:
@@ -90,6 +90,8 @@ smartpl_query_parse_string(struct smartpl *smartpl, const char *expression)
|
||||
{
|
||||
struct smartpl_result result;
|
||||
|
||||
DPRINTF(E_SPAM, L_SCAN, "Parse smartpl query input '%s'\n", expression);
|
||||
|
||||
if (smartpl_lex_parse(&result, expression) != 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_SCAN, "Could not parse '%s': %s\n", expression, result.errmsg);
|
||||
@@ -110,6 +112,9 @@ smartpl_query_parse_string(struct smartpl *smartpl, const char *expression)
|
||||
smartpl->order = safe_strdup(result.order);
|
||||
smartpl->limit = result.limit;
|
||||
|
||||
DPRINTF(E_SPAM, L_SCAN, "Parse smartpl query output '%s': WHERE %s HAVING %s ORDER BY %s LIMIT %d\n",
|
||||
smartpl->title, smartpl->query_where, smartpl->having, smartpl->order, smartpl->limit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user