1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-04 19:04:30 +00:00

Merge pull request #8054 from hannsen/master

search only when category is supported by plugin
This commit is contained in:
sledgehammer999 2017-12-23 20:24:06 +02:00 committed by GitHub
commit 8a590c7472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -128,8 +128,8 @@ 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"
engine.search(what, cat)
if cat in engine.supported_categories:
engine.search(what, cat)
else:
engine.search(what)
return True

View File

@ -127,8 +127,8 @@ 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"
engine.search(what, cat)
if cat in engine.supported_categories:
engine.search(what, cat)
else:
engine.search(what)