diff --git a/package.json b/package.json index e9f6425..5ca35ab 100644 --- a/package.json +++ b/package.json @@ -305,11 +305,12 @@ "name": "站点刷流", "description": "自动托管刷流,将会提高对应站点的访问频率。", "labels": "刷流", - "version": "3.1", + "version": "3.2", "icon": "brush.jpg", "author": "jxxghp,InfinityPacer", "level": 2, "history": { + "v3.2": "支持推送QB种子时启用「先下载首尾文件块」选项", "v3.1": "支持仪表板显示站点刷流数据,需要主程序升级v1.8.7+版本", "v3.0": "优化不同站点刷流到相同种子的逻辑,修复数据页滚动闪烁,部分日志优化", "v2.9": "优化动态删除消息推送,优化配置页UI显示及部分配置项,支持配置种子分类以及开启自动分类管理,取消单独适配站点时区逻辑,可通过配置项「pubtime」自行适配", diff --git a/plugins/brushflow/__init__.py b/plugins/brushflow/__init__.py index c0432fa..74a1c7a 100644 --- a/plugins/brushflow/__init__.py +++ b/plugins/brushflow/__init__.py @@ -76,6 +76,7 @@ class BrushConfig: self.downloader_monitor = config.get("downloader_monitor") self.qb_category = config.get("qb_category") self.auto_qb_category = config.get("auto_qb_category", False) + self.qb_first_last_piece = config.get("qb_first_last_piece", False) self.brush_tag = "刷流" # 站点独立配置 @@ -119,6 +120,7 @@ class BrushConfig: "proxy_delete", "qb_category", "auto_qb_category", + "qb_first_last_piece", # 当新增支持字段时,仅在此处添加字段名 } try: @@ -185,7 +187,8 @@ class BrushConfig: "proxy_download": false, "proxy_delete": false, "qb_category": "刷流", - "auto_qb_category": true + "auto_qb_category": true, + "qb_first_last_piece": true }]""" return desc + config @@ -251,7 +254,7 @@ class BrushFlow(_PluginBase): # 插件图标 plugin_icon = "brush.jpg" # 插件版本 - plugin_version = "3.1" + plugin_version = "3.2" # 插件作者 plugin_author = "jxxghp,InfinityPacer" # 作者主页 @@ -1633,6 +1636,27 @@ class BrushFlow(_PluginBase): } ] }, + { + 'component': 'VCol', + 'props': { + 'cols': 12, + 'md': 4 + }, + 'content': [ + { + 'component': 'VSwitch', + 'props': { + 'model': 'qb_first_last_piece', + 'label': '优先下载首尾文件块', + } + } + ] + } + ] + }, + { + 'component': 'VRow', + "content": [ { 'component': 'VCol', 'props': { @@ -1831,6 +1855,7 @@ class BrushFlow(_PluginBase): "log_more": False, "downloader_monitor": False, "auto_qb_category": False, + "qb_first_last_piece": False, "site_config": BrushConfig.get_demo_site_config() } @@ -2999,6 +3024,7 @@ class BrushFlow(_PluginBase): "downloader_monitor": brush_config.downloader_monitor, "qb_category": brush_config.qb_category, "auto_qb_category": brush_config.auto_qb_category, + "qb_first_last_piece": brush_config.qb_first_last_piece, "enable_site_config": brush_config.enable_site_config, "site_config": brush_config.site_config, "_tabs": self._tabs @@ -3151,6 +3177,7 @@ class BrushFlow(_PluginBase): tag=["已整理", brush_config.brush_tag, tag], category=brush_config.qb_category, is_auto=brush_config.auto_qb_category, + is_first_last_piece_priority=brush_config.qb_first_last_piece, upload_limit=up_speed, download_limit=down_speed) if not state: @@ -3200,6 +3227,7 @@ class BrushFlow(_PluginBase): category: str = None, cookie=None, is_auto=False, + is_first_last_piece_priority=False, **kwargs ) -> bool: """ @@ -3243,7 +3271,7 @@ class BrushFlow(_PluginBase): is_paused=is_paused, tags=tags, use_auto_torrent_management=is_auto, - is_sequential_download=settings.QB_SEQUENTIAL, + is_first_last_piece_priority=is_first_last_piece_priority, cookie=cookie, category=category, **kwargs)