Add Limit Upload Speed to noHL

This commit is contained in:
bobokun 2021-12-14 13:31:29 -05:00
parent db39b16489
commit 693e367b0e
No known key found for this signature in database
GPG key ID: 9665BA6CF5DC2671
2 changed files with 2 additions and 1 deletions

View file

@ -55,6 +55,7 @@ class Config:
self.nohardlinks[cat]["cleanup"] = self.util.check_for_attribute(self.data, "cleanup", parent="nohardlinks", subparent=cat, var_type="bool", default=False,do_print=False)
self.nohardlinks[cat]['max_ratio'] = self.util.check_for_attribute(self.data, "max_ratio", parent="nohardlinks", subparent=cat, 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]['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:
raise Failed(f"Config Error: Category {cat} is defined under nohardlinks attribute but is not defined in the cat attriute.")
else:

View file

@ -197,7 +197,7 @@ class Qbt:
print_line(util.insert_space(f'Torrent Name: {torrent.name}',3),loglevel)
print_line(util.insert_space(f'Added Tag: noHL',6),loglevel)
print_line(util.insert_space(f'Tracker: {tags["url"]}',8),loglevel)
self.set_tags_and_limits(torrent, nohardlinks[category]["max_ratio"], nohardlinks[category]["max_seeding_time"],tags='noHL')
self.set_tags_and_limits(torrent, nohardlinks[category]["max_ratio"], nohardlinks[category]["max_seeding_time"],nohardlinks[category]["limit_upload_speed"],tags='noHL')
#Cleans up previously tagged noHL torrents
else:
# Deletes torrent with data if cleanup is set to true and meets the ratio/seeding requirements