mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-23 03:22:31 -05:00
Allow negation operator for string comparisons in DMAP queries
This commit is contained in:
parent
f56884015f
commit
8025db2dc2
@ -199,13 +199,6 @@ expr returns [ pANTLR3_STRING result, int valid ]
|
|||||||
/* String field: escape string, check for '*' */
|
/* String field: escape string, check for '*' */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (neg_op)
|
|
||||||
{
|
|
||||||
DPRINTF(E_LOG, L_DAAP, "Negation not valid for string operations\n");
|
|
||||||
$valid = 0;
|
|
||||||
goto STR_result_valid_0; /* ABORT */
|
|
||||||
}
|
|
||||||
|
|
||||||
if (op != ':')
|
if (op != ':')
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DAAP, "Operation '\%c' not valid for string values\n", op);
|
DPRINTF(E_LOG, L_DAAP, "Operation '\%c' not valid for string values\n", op);
|
||||||
@ -239,7 +232,7 @@ expr returns [ pANTLR3_STRING result, int valid ]
|
|||||||
switch(op)
|
switch(op)
|
||||||
{
|
{
|
||||||
case ':':
|
case ':':
|
||||||
if (neg_op) /* Not valid for strings, checked above */
|
if (neg_op)
|
||||||
$result->append8($result, " <> ");
|
$result->append8($result, " <> ");
|
||||||
else
|
else
|
||||||
$result->append8($result, " = ");
|
$result->append8($result, " = ");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user