mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07:00
Merge pull request #8054 from hannsen/master
search only when category is supported by plugin
This commit is contained in:
commit
8a590c7472
2 changed files with 4 additions and 4 deletions
|
@ -128,7 +128,7 @@ def run_search(engine_list):
|
|||
engine = engine()
|
||||
#avoid exceptions due to invalid category
|
||||
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)
|
||||
else:
|
||||
engine.search(what)
|
||||
|
|
|
@ -127,7 +127,7 @@ def run_search(engine_list):
|
|||
engine = engine()
|
||||
#avoid exceptions due to invalid category
|
||||
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)
|
||||
else:
|
||||
engine.search(what)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue