From 3b36d54018aa7b4d69cad62c3c2e58b4dedea69a Mon Sep 17 00:00:00 2001 From: jblu Date: Fri, 22 Jul 2022 14:47:36 -0500 Subject: [PATCH] #5 changed name logging --- qlist.py | 4 ++-- qprocess.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/qlist.py b/qlist.py index 7271df9..80c36f7 100644 --- a/qlist.py +++ b/qlist.py @@ -9,12 +9,12 @@ def buildtorlist(self): while self.torrentlist: torrent = self.torrentlist.pop() if self.use_log: - self.tl.debug(f'{torrent["name"]} {torrent["infohash_v1"]}') + self.tl.debug(f'["{torrent["name"][0:20]}..."] {torrent["infohash_v1"]}') if torrent['category'] == 'tech': break if torrent['tracker'] == '': if self.use_log: - self.tl.warning(f"Torrent doesn't have a tracker{torrent['name']} [{torrent['tracker']}]hash: {torrent['hash']}") + self.tl.warning(f'Torrent doesn\'t have a tracker ["{torrent["name"][0:20]}..."] [{torrent["tracker"]}]hash: {torrent["hash"]}') break if self.tracker_whitelist['iptorrents-empirehost'] in torrent['tracker']: if self.use_log: diff --git a/qprocess.py b/qprocess.py index ef7628a..76944fa 100644 --- a/qprocess.py +++ b/qprocess.py @@ -5,36 +5,36 @@ def torprocessor(self): for canidate in self.tracker_nonprotected_list: if 'ipt' in canidate['tags']: if self.use_log: - self.tl.warning(f'{canidate["name"]} was in non-protected list.') + self.tl.warning(f'["{canidate["name"][0:20]}..."] was in non-protected list.') break if canidate['state'] == 'downloading': if self.use_log: - self.tl.info(f'{canidate["name"]} is still downloading and will be skipped.') + self.tl.info(f'["{canidate["name"][0:20]}..."] is still downloading and will be skipped.') break else: self.torrent_hash_delete_list.append(canidate['infohash_v1']) if self.use_log: - self.tl.info(f'Submitted {canidate["name"]} for deletion.') + self.tl.info(f'Submitted ["{canidate["name"][0:20]}..."] for deletion.') for canidate in self.tracker_protected_list: if canidate['state'] == 'downloading': if self.use_log: - self.tl.warning(f'{canidate["name"]} is still downloading and will be skipped.') + self.tl.warning(f'["{canidate["name"][0:20]}..."] is still downloading and will be skipped.') break if canidate['ratio'] < float(1.05): if self.use_log: - self.tl.debug(f'{canidate["name"]} is below a 1.05 ratio({canidate["ratio"]})') + self.tl.debug(f'["{canidate["name"][0:20]}..."] is below a 1.05 ratio({canidate["ratio"]})') if canidate['added_on'] + self.config["age"] <= self.t.time(): if self.use_log: - self.tl.debug(f'{canidate["name"]} Seconds old: {self.t.time() - self.config["age"] - canidate["added_on"]}') + self.tl.debug(f'["{canidate["name"][0:20]}..."] Seconds old: {self.t.time() - self.config["age"] - canidate["added_on"]}') self.torrent_hash_delete_list.append(canidate['infohash_v1']) if self.use_log: - self.tl.info(f'Submitted {canidate["name"]} for deletion from the protected list.') + self.tl.info(f'Submitted ["{canidate["name"][0:20]}..."] for deletion from the protected list.') if canidate['ratio'] >= float(1.05): if self.use_log: - self.tl.debug(f'{canidate["name"]} is above a 1.05 ratio({canidate["ratio"]}).') + self.tl.debug(f'["{canidate["name"][0:20]}..."] is above a 1.05 ratio({canidate["ratio"]}).') self.torrent_hash_delete_list.append(canidate['infohash_v1']) if self.use_log: - self.tl.info(f'Submitted {canidate["name"]} for deletion from the protected list.') + self.tl.info(f'Submitted ["{canidate["name"][0:20]}..."] for deletion from the protected list.') else: pass -- 2.45.2