updated readme and changed to catch root exception

This commit is contained in:
jblu 2022-07-20 10:36:54 -05:00
parent 81df444765
commit 1889901f93
5 changed files with 15 additions and 4 deletions

View File

@ -32,10 +32,20 @@ It should look something like this:
"logpath": "./qc.log", "logpath": "./qc.log",
"age": 2419200, "age": 2419200,
"use_pushover": true, "use_pushover": true,
"use_log": true,
"po_key": "", "po_key": "",
"po_token": "" "po_token": ""
} }
loglevel - is what log messages are written to the log file. It only accepts INFO or DEBUG. Config.json
- host - string, ip or hostname of qbittorrent server
age - is a number in seconds for how long we keep torrents from IPTORRENTS. - port - port of admin gui(used for api aswell)
- username - admin account for qbittorrent
- password - password for admin account
- loglevel - is what log messages are written to the log file. INFO or DEBUG are valid entries(case sensitive).
- logpath - will write a log in root directory if left as is other wise specify other path using forward slashes
- age - is a number in seconds for how long we keep torrents from IPTORRENTS.
- use_pushover - true or false to enable or disable pushover notification summary
- use_log - true or false to enable or disable writing to alog file
- po_key - pushover key
- po_token - pushover api token

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -46,8 +46,9 @@ class Qbt:
self.tl.info('Connecting to host.') self.tl.info('Connecting to host.')
self.qbt_client.auth_log_in() self.qbt_client.auth_log_in()
self.tl.info('Connected.') self.tl.info('Connected.')
except qbittorrentapi.LoginFailed as e: except qbittorrentapi.APIError as e:
self.tl.exception(e) self.tl.exception(e)
self.poc.send_message(e, title="qbit-maid API ERROR")
self.torrentlist = {} self.torrentlist = {}
self.torrentlist = self.qbt_client.torrents_info() self.torrentlist = self.qbt_client.torrents_info()
listqbitapiinfo(self) listqbitapiinfo(self)