From 622dedcd449cff4431a1e09a98b2a4f9ba0eddd9 Mon Sep 17 00:00:00 2001 From: jblu Date: Fri, 15 Jul 2022 20:33:51 -0500 Subject: [PATCH] added check for blank tracker --- qbit-maid.py | 2 +- qlist.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qbit-maid.py b/qbit-maid.py index 238e945..c278a6b 100644 --- a/qbit-maid.py +++ b/qbit-maid.py @@ -44,7 +44,7 @@ class Qbt: self.torrentlist = {} self.torrentlist = self.qbt_client.torrents_info() listqbitapiinfo(self) - listfirsttor(self) + #listfirsttor(self) buildtorlist(self) torrentcount(self) torprocessor(self) diff --git a/qlist.py b/qlist.py index a04dc3a..04234a7 100644 --- a/qlist.py +++ b/qlist.py @@ -6,6 +6,9 @@ def buildtorlist(self): while self.torrentlist: torrent = self.torrentlist.pop() self.tl.debug(f'{torrent["name"]} {torrent["infohash_v1"]}') + if torrent['tracker'] == '': + self.tl.warning(f"Torrent doesn't have a tracker{torrent['name']} [{torrent['tracker']}]hash: {torrent['hash']}") + break if self.tracker_whitelist['iptorrents-empirehost'] in torrent['tracker']: self.tl.debug(f'Protected torrent: {torrent["tracker"]}hash: {torrent["hash"]}') self.protected_count += 1