|
a/src/mediaserver/cdplugins/uprcl/uprclsearch.py |
|
b/src/mediaserver/cdplugins/uprcl/uprclsearch.py |
|
... |
|
... |
97 |
oper = ""
|
97 |
oper = ""
|
98 |
while True:
|
98 |
while True:
|
99 |
i,c = _getchar(s, i)
|
99 |
i,c = _getchar(s, i)
|
100 |
if not c:
|
100 |
if not c:
|
101 |
break
|
101 |
break
|
|
|
102 |
#uplog("upnpsearchtorecoll: nextchar: <%s>" % c)
|
102 |
|
103 |
|
103 |
if c.isspace():
|
104 |
if c.isspace():
|
104 |
continue
|
105 |
continue
|
105 |
|
106 |
|
106 |
if c == "*":
|
107 |
if c == "*":
|
|
... |
|
... |
123 |
field = ""
|
124 |
field = ""
|
124 |
continue
|
125 |
continue
|
125 |
else:
|
126 |
else:
|
126 |
i -= 1
|
127 |
i -= 1
|
127 |
i,w = _readword(s, i)
|
128 |
i,w = _readword(s, i)
|
|
|
129 |
#uplog("_readword returned <%s>" % w)
|
128 |
|
130 |
|
129 |
#print("Got word [%s]" % w)
|
|
|
130 |
if w == 'contains':
|
131 |
if w == 'contains':
|
131 |
out.append(':')
|
132 |
out.append(':')
|
132 |
oper = ':'
|
133 |
oper = ':'
|
133 |
elif w == 'doesNotContain':
|
134 |
elif w == 'doesNotContain':
|
134 |
if len(out) < 1:
|
135 |
if len(out) < 1:
|
|
... |
|
... |
156 |
# between recoll and upnp. This would be very
|
157 |
# between recoll and upnp. This would be very
|
157 |
# difficult to correct, let's hope that the callers
|
158 |
# difficult to correct, let's hope that the callers
|
158 |
# use parentheses
|
159 |
# use parentheses
|
159 |
out.append('OR')
|
160 |
out.append('OR')
|
160 |
else:
|
161 |
else:
|
|
|
162 |
try:
|
161 |
field = upnp2rclfields[w]
|
163 |
field = upnp2rclfields[w]
|
|
|
164 |
except:
|
|
|
165 |
field = w
|
162 |
out.append(field)
|
166 |
out.append(field)
|
163 |
oper = ""
|
167 |
oper = ""
|
164 |
|
168 |
|
165 |
ostr = ""
|
169 |
ostr = ""
|
166 |
for tok in out:
|
170 |
for tok in out:
|