mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-14 07:26:51 +00:00
Merge pull request #447 from InfinityPacer/main
This commit is contained in:
@@ -365,11 +365,12 @@
|
||||
"name": "站点刷流",
|
||||
"description": "自动托管刷流,将会提高对应站点的访问频率。",
|
||||
"labels": "刷流,仪表板",
|
||||
"version": "3.6",
|
||||
"version": "3.7",
|
||||
"icon": "brush.jpg",
|
||||
"author": "jxxghp,InfinityPacer",
|
||||
"level": 2,
|
||||
"history": {
|
||||
"v3.7": "下载数量调整为仅获取刷流标签种子并修复了一些细节问题",
|
||||
"v3.6": "优化检查服务中的时间管控",
|
||||
"v3.5": "移除「删种排除MoviePilot任务」配置项(请使用「删除排除标签」替代),完善刷流任务触发插件事件相关逻辑(联动H&R助手)",
|
||||
"v3.4": "移除「记录更多日志」配置项并调整为DEBUG日志,支持「删除排除标签」配置项,增加刷流任务时支持触发插件事件(联动H&R助手)",
|
||||
|
||||
@@ -257,7 +257,7 @@ class BrushFlow(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "brush.jpg"
|
||||
# 插件版本
|
||||
plugin_version = "3.6"
|
||||
plugin_version = "3.7"
|
||||
# 插件作者
|
||||
plugin_author = "jxxghp,InfinityPacer"
|
||||
# 作者主页
|
||||
@@ -3641,12 +3641,21 @@ class BrushFlow(_PluginBase):
|
||||
"""
|
||||
获取正在下载的任务数量
|
||||
"""
|
||||
brush_config = self.__get_brush_config()
|
||||
downloader = self.__get_downloader(brush_config.downloader)
|
||||
if not downloader:
|
||||
try:
|
||||
brush_config = self.__get_brush_config()
|
||||
downloader = self.__get_downloader(brush_config.downloader)
|
||||
if not downloader:
|
||||
return 0
|
||||
|
||||
torrents = downloader.get_downloading_torrents(tags=brush_config.brush_tag)
|
||||
if torrents is None:
|
||||
logger.warn("获取下载数量失败,可能是下载器连接发生异常")
|
||||
return 0
|
||||
|
||||
return len(torrents)
|
||||
except Exception as e:
|
||||
logger.error(f"获取下载数量发生异常: {e}")
|
||||
return 0
|
||||
torrents = downloader.get_downloading_torrents()
|
||||
return len(torrents) or 0
|
||||
|
||||
@staticmethod
|
||||
def __get_pubminutes(pubdate: str) -> float:
|
||||
|
||||
Reference in New Issue
Block a user