From 02e81a79b2b6c558f33f6975316d21f1f6ca6232 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 7 Sep 2023 23:11:08 +0800 Subject: [PATCH] fix --- app/plugins/brushflow/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/plugins/brushflow/__init__.py b/app/plugins/brushflow/__init__.py index 96ce23cf..cae535b9 100644 --- a/app/plugins/brushflow/__init__.py +++ b/app/plugins/brushflow/__init__.py @@ -759,12 +759,15 @@ class BrushFlow(_PluginBase): if not torrents: logger.info(f"站点 {siteinfo.name} 没有获取到种子") continue + # 按pubdate降序排列 + torrents.sort(key=lambda x: x.pubdate or '', reverse=True) # 过滤种子 for torrent in torrents: # 保种体积(GB) 促销 if self._disksize \ - and (torrents_size + torrent.size) > self._size * 1024**3: - logger.warn(f"当前做种体积 {StringUtils.str_filesize(torrents_size)} 已超过保种体积 {self._disksize},停止新增任务") + and (torrents_size + torrent.size) > float(self._size) * 1024**3: + logger.warn(f"当前做种体积 {StringUtils.str_filesize(torrents_size)} " + f"已超过保种体积 {self._disksize},停止新增任务") return # 促销 if self._freeleech and torrent.downloadvolumefactor != 0: