From 600b6937f86b955167122a119d58c5df43147a7c Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Tue, 21 Nov 2023 09:01:39 -0800 Subject: [PATCH] Update script to reflect current docs --- fighter/scripts/remove_trumped_torrents.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/fighter/scripts/remove_trumped_torrents.py b/fighter/scripts/remove_trumped_torrents.py index ebd8c04..d2cd052 100644 --- a/fighter/scripts/remove_trumped_torrents.py +++ b/fighter/scripts/remove_trumped_torrents.py @@ -1,9 +1,17 @@ -host = input("Enter host (e.g. 'localhost:8080'): ") -username = input("Enter username: ") -password = input("Enter password: ") +connection_info = dict( + host = input("Enter host (e.g. 'localhost'): "), + port = input("Enter port (e.g. '8080'): "), + username = input("Enter username: "), + password = input("Enter password: "), +) import qbittorrentapi -client = Client(host=host, username=username, password=password) +client = qbittorrentapi.Client(**connection_info) + +try: + client.auth_log_in() +except qbittorrentapi.LoginFailed as error: + print(error) torrent_list = client.torrents.info()