Skip to content

Commit

Permalink
Minor change (delete qbittorrent settings from database)
Browse files Browse the repository at this point in the history
Signed-off-by: anasty17 <[email protected]>
  • Loading branch information
anasty17 committed Nov 20, 2022
1 parent 5775eb5 commit 2080ddc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,14 @@ def aria2c_init():
qb_client = get_client()
if not qbit_options:
qbit_options = dict(qb_client.app_preferences())
del qbit_options['listen_port']
for k in list(qbit_options.keys()):
if k.startswith('rss'):
del qbit_options[k]
else:
qb_opt = {**qbit_options}
del qb_opt['listen_port']
for k, v in list(qb_opt.items()):
if v in ["", "*"] or k.startswith('rss'):
for v in list(qb_opt.values()):
if v in ["", "*"]:
del qb_opt[k]
qb_client.app_set_preferences(qb_opt)

Expand Down

0 comments on commit 2080ddc

Please sign in to comment.