Merge branch 'master' into youtube_fix

This commit is contained in:
Alexandre Flament 2019-04-09 03:21:37 +02:00 committed by GitHub
commit e868650df7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 9 deletions

View File

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