#9 lots of changes, refactored qprocess

This commit is contained in:
2022-07-23 14:59:43 -05:00
parent e02978507e
commit ae4350a547
4 changed files with 39 additions and 33 deletions

View File

@@ -7,6 +7,7 @@ from qlogging import *
from qprocess import *
import time
import logging
from collections import Counter
class Qbt:
def __init__(self):
@@ -26,6 +27,7 @@ class Qbt:
# Create the logging and pushover objects
self.tl = logging
self.po = pushover
self.ct = Counter
# Variables torlog uses from config.json
self.use_pushover = self.config["use_pushover"]
self.use_log = self.config["use_log"]
@@ -42,8 +44,8 @@ class Qbt:
# Pulling domain names to treat carefully
f = open('./tracker-whitelist.json')
self.tracker_whitelist = load(f)
self.tracker_protected_list = []
self.tracker_nonprotected_list = []
self.tracker_list = []
self.up_tor_counter = 0
self.torrent_hash_delete_list = []
if self.use_log:
self.tl.debug(self.tracker_whitelist)
@@ -71,7 +73,8 @@ class Qbt:
printprocessor(self)
if self.use_pushover:
tornotifysummary(self)
tordelete(self)
if self.config["delete_torrents"]:
tordelete(self)
# Run
if __name__== "__main__":