[FR]: Allow min_seeding_time #111

This commit is contained in:
bobokun 2022-02-26 15:52:34 -05:00
parent 015ef83d41
commit 9845f89aff
No known key found for this signature in database
GPG key ID: 9665BA6CF5DC2671
2 changed files with 4 additions and 1 deletions

View file

@ -167,6 +167,8 @@ class Config:
var_type="float", default_int=-2, default_is_none=True, do_print=False)
self.nohardlinks[cat]['max_seeding_time'] = self.util.check_for_attribute(self.data, "max_seeding_time", parent="nohardlinks", subparent=cat,
var_type="int", default_int=-2, default_is_none=True, do_print=False)
self.nohardlinks[cat]['min_seeding_time'] = self.util.check_for_attribute(self.data, "min_seeding_time", parent="nohardlinks", subparent=cat,
var_type="int", default_int=0, default=0, do_print=False)
self.nohardlinks[cat]['limit_upload_speed'] = self.util.check_for_attribute(self.data, "limit_upload_speed", parent="nohardlinks", subparent=cat,
var_type="int", default_int=-1, default_is_none=True, do_print=False)
else:

View file

@ -329,7 +329,8 @@ class Qbt:
# Cleans up previously tagged noHL torrents
else:
# Deletes torrent with data if cleanup is set to true and meets the ratio/seeding requirements
if (nohardlinks[category]['cleanup'] and torrent.state_enum.is_paused and len(nohardlinks[category]) > 0):
if (nohardlinks[category]['cleanup'] and torrent.state_enum.is_paused and len(nohardlinks[category]) > 0
and torrent.seeding_time > (nohardlinks[category]["min_seeding_time"]*60)):
tdel_dict[torrent.name] = torrent['content_path'].replace(root_dir, root_dir)
# Checks to see if previous noHL tagged torrents now have hard links.
if (not (util.nohardlink(torrent['content_path'].replace(root_dir, root_dir))) and ('noHL' in torrent.tags)):