#5 changed name logging #6
4
qlist.py
4
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:
|
||||
|
18
qprocess.py
18
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user