mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-29 23:46:28 +08:00
[FR]: Allow min_seeding_time #111
This commit is contained in:
parent
015ef83d41
commit
9845f89aff
2 changed files with 4 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue