fixed attrubute error

This commit is contained in:
jblu 2022-07-25 12:36:15 -05:00
parent fb55c54f01
commit 26ac36a164
2 changed files with 16 additions and 13 deletions

View File

@ -69,6 +69,7 @@ class Qbt:
listqbitapiinfo(self)
listfirsttor(self)
buildtorlist(self)
processcounts(self)
#tordeletetags(self)
if self.use_log:
torrentcount(self)

View File

@ -16,6 +16,21 @@ def tornotifytest(self):
"""Used to make sure tornotify is working and messages are getting to the client"""
self.poc.send_message("Test Message", title="qbit-maid")
def processcounts(self):
self.c = self.ct()
for item in self.tracker_list:
self.c[item["tags"]] += 1
def printprocessor(self):
"""Print summary of torrents"""
self.tl.info(f'Total: {self.total_torrents}')
self.tl.info(f'Premature: {self.preme_tor_counter}')
self.tl.info(f'Ignored: {self.ignored_counter}')
self.tl.info(f'Protected: {self.c[self.tracker_protected_tag]}')
self.tl.info(f'Non-protected: {self.c[self.tracker_non_protected_tag]}')
self.tl.info(f'Orphaned: {self.up_tor_counter}')
self.tl.info(f'Marked for deletion: {len(self.torrent_hash_delete_list)}')
def tornotifysummary(self):
"""Main notification method when the app is used in an automated fashion"""
self.poc.send_message(f" Total: {self.total_torrents}\n\
@ -26,19 +41,6 @@ def tornotifysummary(self):
Orphaned: {self.up_tor_counter}\n\
Marked for deletion: {len(self.torrent_hash_delete_list)}", title="--- qbit-maid summary ---")
def printprocessor(self):
"""Print summary of torrents"""
self.c = self.ct()
for item in self.tracker_list:
self.c[item["tags"]] += 1
self.tl.info(f'Total: {self.total_torrents}')
self.tl.info(f'Premature: {self.preme_tor_counter}')
self.tl.info(f'Ignored: {self.ignored_counter}')
self.tl.info(f'Protected: {self.c[self.tracker_protected_tag]}')
self.tl.info(f'Non-protected: {self.c[self.tracker_non_protected_tag]}')
self.tl.info(f'Orphaned: {self.up_tor_counter}')
self.tl.info(f'Marked for deletion: {len(self.torrent_hash_delete_list)}')
def getunixtimestamp(self):
"""Used for debuging and development related to unixtimestamps, not used in main script but useful"""
self.uts = self.t.time()