diff --git a/plugins.v2/cd2assistant/__init__.py b/plugins.v2/cd2assistant/__init__.py index ef5de90..c7b4ce6 100644 --- a/plugins.v2/cd2assistant/__init__.py +++ b/plugins.v2/cd2assistant/__init__.py @@ -5,14 +5,9 @@ from typing import Any, List, Dict, Tuple, Optional import pytz from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.triggers.cron import CronTrigger -try: - from clouddrive import CloudDriveClient, Client - from clouddrive.proto import CloudDrive_pb2 -except ImportError: - from sys import executable - from subprocess import run - run([executable, "-m", "pip", "install", "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/refs/heads/main/data/clouddrive-0.0.12.7.1.tar.gz"], check=True) +from clouddrive import CloudDriveClient, Client +from clouddrive.proto import CloudDrive_pb2 from app import schemas from app.core.config import settings @@ -22,7 +17,6 @@ from app.plugins import _PluginBase from app.schemas import NotificationType from app.schemas.types import EventType - class Cd2Assistant(_PluginBase): # 插件名称 plugin_name = "CloudDrive2助手" diff --git a/plugins.v2/cd2assistant/requirements.txt b/plugins.v2/cd2assistant/requirements.txt new file mode 100644 index 0000000..de32f19 --- /dev/null +++ b/plugins.v2/cd2assistant/requirements.txt @@ -0,0 +1,17 @@ +https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/refs/heads/main/data/clouddrive-0.0.12.7.1.tar.gz +glob_pattern +grpcio +grpcio-tools +grpclib +grpclib[protobuf] +http_response +path_ignore_pattern +protobuf +python-argtools +python-dateutil +python-download>=0.0.3 +python-filewrap>=0.1.1 +python-httpfile>=0.0.2 +python-http_request>=0.0.6 +python-urlopen +yarl diff --git a/plugins/cloudflarespeedtest/__init__.py b/plugins/cloudflarespeedtest/__init__.py index d488a45..8602b80 100644 --- a/plugins/cloudflarespeedtest/__init__.py +++ b/plugins/cloudflarespeedtest/__init__.py @@ -62,7 +62,7 @@ class CloudflareSpeedTest(_PluginBase): _cf_ipv6 = None _result_file = None _release_prefix = 'https://github.com/XIU2/CloudflareSpeedTest/releases/download' - _binary_name = 'CloudflareST' + _binary_name = 'cfst' def init_plugin(self, config: dict = None): # 停止现有任务 @@ -832,4 +832,4 @@ class CloudflareSpeedTest(_PluginBase): self._scheduler.shutdown() self._scheduler = None except Exception as e: - logger.error("退出插件失败:%s" % str(e)) \ No newline at end of file + logger.error("退出插件失败:%s" % str(e))