mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 23:37:59 +00:00
search only when category is supported by plugin Closes #8053
This commit is contained in:
parent
84c84160fd
commit
d534973650
@ -128,8 +128,8 @@ def run_search(engine_list):
|
|||||||
engine = engine()
|
engine = engine()
|
||||||
#avoid exceptions due to invalid category
|
#avoid exceptions due to invalid category
|
||||||
if hasattr(engine, 'supported_categories'):
|
if hasattr(engine, 'supported_categories'):
|
||||||
cat = cat if cat in engine.supported_categories else "all"
|
if cat in engine.supported_categories:
|
||||||
engine.search(what, cat)
|
engine.search(what, cat)
|
||||||
else:
|
else:
|
||||||
engine.search(what)
|
engine.search(what)
|
||||||
return True
|
return True
|
||||||
|
@ -127,8 +127,8 @@ def run_search(engine_list):
|
|||||||
engine = engine()
|
engine = engine()
|
||||||
#avoid exceptions due to invalid category
|
#avoid exceptions due to invalid category
|
||||||
if hasattr(engine, 'supported_categories'):
|
if hasattr(engine, 'supported_categories'):
|
||||||
cat = cat if cat in engine.supported_categories else "all"
|
if cat in engine.supported_categories:
|
||||||
engine.search(what, cat)
|
engine.search(what, cat)
|
||||||
else:
|
else:
|
||||||
engine.search(what)
|
engine.search(what)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user