mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-13 23:16:47 +00:00
Merge pull request #447 from InfinityPacer/main
This commit is contained in:
@@ -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