Skip to content

The only downloader you need. 下载器的集大成者。

refactor: packs/ 回归纯合约,pack 知识留在 pack 代码中

XiaoYouChRf30df3de53e2
diff --git a/features/bili_pack/android.py b/features/bili_pack/android.py
index 275eeab1..dd36f69b 100644
--- a/features/bili_pack/android.py
+++ b/features/bili_pack/android.py
@@ -15,6 +15,12 @@ from .account import (
UI_CLASS = "com.xychr.ghostdownloader.features.bili_pack.BilibiliUi"
+
+def qualityOptions() -> list[dict]:
+ from .config import QUALITY_VALUES, QUALITY_LABELS
+ return [{"value": v, "label": l} for v, l in zip(QUALITY_VALUES, QUALITY_LABELS)]
+
+
QR_STATUS = {
QR_GOT_URL: "ready",
QR_UNSCANNED: "waiting",
diff --git a/features/github_pack/android.py b/features/github_pack/android.py
index 682b3943..24de1d00 100644
--- a/features/github_pack/android.py
+++ b/features/github_pack/android.py
@@ -2,7 +2,10 @@ from http_pack.android import editFields
UI_CLASS = "com.xychr.ghostdownloader.features.github_pack.GitHubUi"
+def proxySiteList() -> list:
+ from .config import GITHUB_PROXY_SITES
+ return list(GITHUB_PROXY_SITES)
+
async def probeSites() -> dict:
from .config import probeProxyLatencies
-
return await probeProxyLatencies()
diff --git a/features/huggingface_pack/android.py b/features/huggingface_pack/android.py
index 954319f4..e02c0597 100644
--- a/features/huggingface_pack/android.py
+++ b/features/huggingface_pack/android.py
@@ -1,6 +1,13 @@
UI_CLASS = "com.xychr.ghostdownloader.features.huggingface_pack.HuggingFaceUi"
+def proxySiteList() -> list:
+ from .config import HF_PROXY_SITES
+ return list(HF_PROXY_SITES)
+
+def tokenUrl() -> str:
+ from .config import TOKEN_URL
+ return TOKEN_URL
+
async def probeSites() -> dict:
from .config import probeProxyLatencies
-
return await probeProxyLatencies()