#5 changed name logging #6

Merged
jonbranan merged 1 commits from feature-name-trunk into main 2022-07-22 14:50:08 -05:00
2 changed files with 11 additions and 11 deletions

View File

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

View File

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