The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
refactor(android): Python 和 Kotlin 两侧统一叫 Bridge
XiaoYouChR48c8044dbaee
diff --git a/features/bili_pack/android.py b/features/bili_pack/android.pyindex dd36f69b..6331fa4e 100644--- a/features/bili_pack/android.py+++ b/features/bili_pack/android.py@@ -49,7 +49,7 @@ def init(pack) -> dict:return {"accountState": _account.accountChanged, "qrState": _account.qrStateChanged}-# ---- task/draft serialization (called by engine.py internally) ----+# ---- task/draft serialization (called by bridge.py internally) ----def taskFields(task) -> dict:return {@@ -125,7 +125,7 @@ def draftFields(task) -> dict:}-# ---- draft mutations (called by engine.py setDraft dispatcher) ----+# ---- draft mutations (called by bridge.py setDraft dispatcher) ----def setControl(task, controlId: str, value: str):if controlId == "video":diff --git a/tests/conftest.py b/tests/conftest.pyindex 380610c0..c1d5544f 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -6,12 +6,12 @@ import sysimport pytestfrom aiohttp import web-from tests.helpers import loadEngine+from tests.helpers import loadBridge@pytest.fixture(scope="module")def bridge():- return loadEngine()+ return loadBridge()@pytest.fixturediff --git a/tests/helpers.py b/tests/helpers.pyindex ba8b12d6..f1635ea8 100644--- a/tests/helpers.py+++ b/tests/helpers.py@@ -7,7 +7,7 @@ from types import ModuleTypefrom aiohttp import web-ENGINE_PATH = Path(__file__).parents[1] / "android/app/src/main/python/engine.py"+BRIDGE_PATH = Path(__file__).parents[1] / "android/app/src/main/python/bridge.py"class StubFlows:@@ -21,12 +21,12 @@ class StubFlows:pass-def loadEngine():+def loadBridge():stub = ModuleType("app.platform.file_watcher")stub.InotifyFileWatcher = objectsys.modules["app.platform.file_watcher"] = stub- spec = importlib.util.spec_from_file_location("android_engine", ENGINE_PATH)+ spec = importlib.util.spec_from_file_location("android_bridge", BRIDGE_PATH)module = importlib.util.module_from_spec(spec)spec.loader.exec_module(module)return modulediff --git a/tests/test_android_speed_meter.py b/tests/test_android_speed_meter.pyindex d8780911..731739be 100644--- a/tests/test_android_speed_meter.py+++ b/tests/test_android_speed_meter.py@@ -1,4 +1,4 @@-"""engine.py 何时让 SpeedMeter 走表:它驱动 taskProgress 推送,做种时也要走。"""+"""bridge.py 何时让 SpeedMeter 走表:它驱动 taskProgress 推送,做种时也要走。"""from tests.test_task_service import finishRun, makeSeedTask, makeTask, service # noqa: F401