qBitTorrent Seed Ratio fix

- added missing api param
This commit is contained in:
AdeHub
2024-08-11 07:53:58 +12:00
parent c264c75282
commit 000509353a
2 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -1793,7 +1793,7 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
# PIRATE BAY
# 09/08/2024 - thepiratebay.org/Proxy no longer working, switch to apibay.org as default
# 09/08/2024 - thepiratebay.org no longer working, switch to apibay.org as default
# Pirate Bay api
if (headphones.CONFIG.PIRATEBAY and not headphones.CONFIG.PIRATEBAY_PROXY_URL or
@@ -1833,7 +1833,7 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None,
resultlist.append(Result(title, size, url, provider, "torrent", match))
# Pirate Bay (09/08/2024 not working, to fix or remove)
# Pirate Bay (09/08/2024 some proxies working (e.g. prbay.top), some not)
if (headphones.CONFIG.PIRATEBAY and headphones.CONFIG.PIRATEBAY_PROXY_URL and
"apibay.org" not in headphones.CONFIG.PIRATEBAY_PROXY_URL):
provider = "The Pirate Bay"
+5 -2
View File
@@ -784,17 +784,20 @@ class Client(object):
data.update({'value': json.dumps(value)})
return self._post('torrents/setSuperSeeding', data=data)
def set_share_ratio(self, infohash_list, ratio_limit=-2, seeding_time_limit=-2):
def set_share_ratio(self, infohash_list, ratio_limit=-2, seeding_time_limit=-2, inactive_seeding_time_limit=-2):
"""
Set the share ratio limit of the supplied torrents.
:param infohash_list: Single or list() of infohashes.
:param ratio_limit: Ratio limit (optional 2 decimals). -2 means the global limit, -1 means no limit.
:param seeding_time_limit: Time limit in minutes. -2 means the global limit, -1 means no limit.
:param inactive_seeding_time_limit: Time limit in minutes. -2 means the global limit, -1 means no limit.
"""
data = self._process_infohash_list(infohash_list)
data.update({'ratioLimit': ratio_limit,
'seedingTimeLimit': seeding_time_limit})
'seedingTimeLimit': seeding_time_limit,
'inactiveSeedingTimeLimit': inactive_seeding_time_limit}
)
return self._post('torrents/setShareLimits', data=data)