[fix] stop engine from sending duplicated requests

This commit is contained in:
Marc Abonce Seguin 2019-03-28 19:25:20 -06:00
parent a80a2d05d1
commit aaa0524cec

View file

@ -113,17 +113,14 @@ class RawTextQuery(object):
parse_next = True
engine_name = engine_shortcuts[prefix]
if engine_name in engines:
for engine_category in engines[engine_name].categories:
self.engines.append({'category': engine_category,
self.engines.append({'category': 'none',
'name': engine_name,
'from_bang': True})
# check if prefix is equal with engine name
elif prefix in engines:
parse_next = True
if prefix in engines:
for engine_category in engines[prefix].categories:
self.engines.append({'category': engine_category,
self.engines.append({'category': 'none',
'name': prefix,
'from_bang': True})