mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-26 05:56:58 +08:00
Add Limit Upload Speed to noHL
This commit is contained in:
parent
db39b16489
commit
693e367b0e
2 changed files with 2 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue