Skip to content

Commit dba1cac

Browse files
committed
feat: aliyun opentoken add api.nn.ci url
1 parent aed2ed3 commit dba1cac

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

all_in_one.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ function check_aliyunpan_opentoken() {
415415
if cache_result "${data_dir}/myopentoken.txt" "${DDSREM_CONFIG_DIR}/cache_data/check_aliyunpan_opentoken.txt"; then
416416
if curl -Is https://api.xhofe.top/alist/ali_open/qr | head -n 1 | grep -q '200'; then
417417
url_host="api.xhofe.top"
418+
elif curl -Is https://api.nn.ci/alist/ali_open/qr | head -n 1 | grep -q '200'; then
419+
url_host="api.nn.ci"
418420
else
419421
url_host="api-cf.nn.ci"
420422
fi
@@ -508,6 +510,9 @@ function qrcode_mode_choose() {
508510
if curl -Is https://api.xhofe.top/alist/ali_open/qr | head -n 1 | grep -q '200'; then
509511
extra_parameters="--api_url=api.xhofe.top"
510512
INFO "使用 api.xhofe.top 地址"
513+
elif curl -Is https://api.nn.ci/alist/ali_open/qr | head -n 1 | grep -q '200'; then
514+
extra_parameters="--api_url=api.nn.ci"
515+
INFO "使用 api.nn.ci 地址"
511516
else
512517
extra_parameters="--api_url=api-cf.nn.ci"
513518
INFO "使用 api-cf.nn.ci 地址"
@@ -3935,8 +3940,8 @@ function main_xiaoya_all_emby() {
39353940
show_main_xiaoya_all_emby=false
39363941
echo -e "——————————————————————————————————————————————————————————————————————————————————"
39373942
echo -e "${Blue}小雅Emby全家桶${Font}\n"
3938-
echo -e "${Red}注意:当前 Emby 全家桶要求 Emby 容器版本不低于 4.9.0.38${Font}"
3939-
echo -e "${Red}如果您的版本低于 4.9.0.38 请使用 菜单2-10 一键升级版本${Font}"
3943+
echo -e "${Yellow}注意:当前 Emby 全家桶要求 Emby 容器版本不低于 4.9.0.38${Font}"
3944+
echo -e "${Yellow}如果您的版本低于 4.9.0.38 请使用 菜单2-10 一键升级版本${Font}"
39403945
if docker container inspect "$(cat ${DDSREM_CONFIG_DIR}/container_name/xiaoya_alist_name.txt)" > /dev/null 2>&1; then
39413946
local container_status
39423947
container_status=$(docker inspect --format='{{.State.Status}}' "$(cat ${DDSREM_CONFIG_DIR}/container_name/xiaoya_alist_name.txt)")

glue_python/aliyunopentoken/aliyunopentoken.py

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def poll_qrcode_status(data, log_print, _api_url):
7777
elif _api_url == "api-cf.nn.ci":
7878
url = f"https://api-cf.nn.ci/proxy/https://open.aliyundrive.com/oauth/qrcode/{data}/status"
7979
_re = requests.get(url, timeout=10)
80+
elif _api_url == "api.nn.ci":
81+
url = f"https://api.nn.ci/proxy/https://open.aliyundrive.com/oauth/qrcode/{data}/status"
82+
_re = requests.get(url, timeout=10)
8083
else:
8184
url = f"https://openapi.aliyundrive.com/oauth/qrcode/{data}/status"
8285
_re = requests.get(url, timeout=10)
@@ -96,6 +99,8 @@ def poll_qrcode_status(data, log_print, _api_url):
9699
)
97100
elif _api_url == "api-cf.nn.ci":
98101
_re = requests.post("https://api-cf.nn.ci/alist/ali_open/code", json=data_2, timeout=10)
102+
elif _api_url == "api.nn.ci":
103+
_re = requests.post("https://api.nn.ci/alist/ali_open/code", json=data_2, timeout=10)
99104
else:
100105
_re = requests.post(
101106
"https://aliyundrive-oauth.messense.me/oauth/access_token",
@@ -191,6 +196,8 @@ def shutdown():
191196
re = requests.get("https://api.xhofe.top/alist/ali_open/qr", headers=headers, timeout=10)
192197
elif args.api_url == "api-cf.nn.ci":
193198
re = requests.get("https://api-cf.nn.ci/alist/ali_open/qr", timeout=10)
199+
elif args.api_url == "api.nn.ci":
200+
re = requests.get("https://api.nn.ci/alist/ali_open/qr", timeout=10)
194201
else:
195202
re = requests.post(
196203
"https://aliyundrive-oauth.messense.me/oauth/authorize/qrcode",

0 commit comments

Comments
 (0)