added check for blank tracker

This commit is contained in:
jblu 2022-07-15 20:33:51 -05:00
parent 976e36316c
commit 622dedcd44
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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