fix brush

This commit is contained in:
jxxghp 2023-09-14 09:08:57 +08:00
parent 4e515ec442
commit 7afe82480c

View File

@ -1322,10 +1322,10 @@ class BrushFlow(_PluginBase):
end_pubtime = 0 end_pubtime = 0
# 将种子发布日志转换为与当前时间的差 # 将种子发布日志转换为与当前时间的差
if begin_pubtime and not end_pubtime \ if begin_pubtime and not end_pubtime \
and pubdate_minutes > int(begin_pubtime) * 60: and pubdate_minutes > int(begin_pubtime):
continue continue
elif begin_pubtime and end_pubtime \ elif begin_pubtime and end_pubtime \
and not int(begin_pubtime) * 60 <= pubdate_minutes <= int(end_pubtime) * 60: and not int(begin_pubtime) <= pubdate_minutes <= int(end_pubtime):
continue continue
# 同时下载任务数 # 同时下载任务数
downloads = self.__get_downloading_count() downloads = self.__get_downloading_count()
@ -1478,9 +1478,10 @@ class BrushFlow(_PluginBase):
torrent_title=torrent_info.get("title"), torrent_title=torrent_info.get("title"),
reason=f"下载耗时达到 {self._download_time} 小时") reason=f"下载耗时达到 {self._download_time} 小时")
continue continue
# 平均上传速度KB / s # 平均上传速度KB / s大于30分钟才有效
if self._seed_avgspeed: if self._seed_avgspeed:
if torrent_info.get("avg_upspeed") <= float(self._seed_avgspeed) * 1024: if torrent_info.get("avg_upspeed") <= float(self._seed_avgspeed) * 1024 and \
torrent_info.get("seeding_time") >= 30 * 60:
logger.info(f"平均上传速度低于 {self._seed_avgspeed} KB/s删除种子{torrent_info.get('title')}") logger.info(f"平均上传速度低于 {self._seed_avgspeed} KB/s删除种子{torrent_info.get('title')}")
downloader.delete_torrents(ids=torrent_hash, delete_file=True) downloader.delete_torrents(ids=torrent_hash, delete_file=True)
remove_torrents.append(torrent_info) remove_torrents.append(torrent_info)