From d6e9c14183f118af6bf79634f6de65069f059c4c Mon Sep 17 00:00:00 2001 From: thsrite Date: Sat, 9 Sep 2023 15:47:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=20qb=E5=88=A0=E7=A7=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/torrentremover/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/plugins/torrentremover/__init__.py b/app/plugins/torrentremover/__init__.py index a02cd6b7..2e78472a 100644 --- a/app/plugins/torrentremover/__init__.py +++ b/app/plugins/torrentremover/__init__.py @@ -624,7 +624,7 @@ class TorrentRemover(_PluginBase): # 平均上传速度 torrent_upload_avs = torrent.uploaded / torrent_seeding_time if torrent_seeding_time else 0 # 大小 单位:GB - sizes = self._size.split(',') if self._size else [] + sizes = self._size.split('-') if self._size else [] minsize = sizes[0] * 1024 * 1024 * 1024 if sizes else 0 maxsize = sizes[-1] * 1024 * 1024 * 1024 if sizes else 0 # 分享率 @@ -634,7 +634,7 @@ class TorrentRemover(_PluginBase): if self._time and torrent_seeding_time <= float(self._time) * 3600: return None # 文件大小 - if self._size and (torrent.size >= maxsize or torrent.size <= minsize): + if self._size and (torrent.size >= int(maxsize) or torrent.size <= int(minsize)): return None if self._upspeed and torrent_upload_avs >= float(self._upspeed) * 1024: return None @@ -668,7 +668,7 @@ class TorrentRemover(_PluginBase): # 平均上传速茺 torrent_upload_avs = torrent_uploaded / torrent_seeding_time if torrent_seeding_time else 0 # 大小 单位:GB - sizes = self._size.split(',') if self._size else [] + sizes = self._size.split('-') if self._size else [] minsize = sizes[0] * 1024 * 1024 * 1024 if sizes else 0 maxsize = sizes[-1] * 1024 * 1024 * 1024 if sizes else 0 # 分享率 @@ -676,7 +676,7 @@ class TorrentRemover(_PluginBase): return None if self._time and torrent_seeding_time <= float(self._time) * 3600: return None - if self._size and (torrent.total_size >= maxsize or torrent.total_size <= minsize): + if self._size and (torrent.total_size >= int(maxsize) or torrent.total_size <= int(minsize)): return None if self._upspeed and torrent_upload_avs >= float(self._upspeed) * 1024: return None