From 693e367b0ea6f646ca1e5403ecefdb5fe245664b Mon Sep 17 00:00:00 2001 From: bobokun Date: Tue, 14 Dec 2021 13:31:29 -0500 Subject: [PATCH] Add Limit Upload Speed to noHL --- modules/config.py | 1 + modules/qbittorrent.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/config.py b/modules/config.py index 92783d9..7489cb9 100644 --- a/modules/config.py +++ b/modules/config.py @@ -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: diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index 967f0f1..cb92e22 100644 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -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