From 000509353a635efc37fdcaded5f7849a85c4acc7 Mon Sep 17 00:00:00 2001 From: AdeHub Date: Sun, 11 Aug 2024 07:53:58 +1200 Subject: [PATCH] qBitTorrent Seed Ratio fix - added missing api param --- headphones/searcher.py | 4 ++-- lib/qbittorrentv2/client.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index a2f6e956..57f06a5f 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -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" diff --git a/lib/qbittorrentv2/client.py b/lib/qbittorrentv2/client.py index 38c5d17c..ac9b571e 100755 --- a/lib/qbittorrentv2/client.py +++ b/lib/qbittorrentv2/client.py @@ -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)