From bff955e45b93060aafc76d0c5117635e08a476cf Mon Sep 17 00:00:00 2001 From: admin <362324317@qq.com> Date: Mon, 18 May 2026 20:25:40 +0800 Subject: [PATCH] =?UTF-8?q?v0.4.5:=20=E4=BF=AE=E5=A4=8D=E5=8F=8C=E9=87=8D?= =?UTF-8?q?=E8=A7=A3=E5=AF=86/=E9=85=8D=E7=BD=AEkey/=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E5=90=8C=E6=AD=A5/buil+ssh=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- build.sh | 2 +- source_clean/VERSION | 2 +- source_clean/build.sh | 11 +++++++++++ source_clean/src/cloud/credential.service.ts | 3 ++- source_clean/src/database/database.ts | 1 + source_clean/src/routes/admin.routes.ts | 2 +- 7 files changed, 18 insertions(+), 5 deletions(-) create mode 100755 source_clean/build.sh diff --git a/VERSION b/VERSION index 1d0ba9e..0bfccb0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.0 +0.4.5 diff --git a/build.sh b/build.sh index e4b9040..bc3726d 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")/source_clean" VERSION=$(cat ../VERSION) echo "🔨 Building CloudSearch v${VERSION}..." - +cp ../VERSION ./VERSION docker build -t cloudsearch-app:v${VERSION} -t cloudsearch-app:latest . echo "✅ Built: cloudsearch-app:v${VERSION} + cloudsearch-app:latest" diff --git a/source_clean/VERSION b/source_clean/VERSION index 1d0ba9e..0bfccb0 100644 --- a/source_clean/VERSION +++ b/source_clean/VERSION @@ -1 +1 @@ -0.4.0 +0.4.5 diff --git a/source_clean/build.sh b/source_clean/build.sh new file mode 100755 index 0000000..e4b9040 --- /dev/null +++ b/source_clean/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e +cd "$(dirname "$0")/source_clean" + +VERSION=$(cat ../VERSION) +echo "🔨 Building CloudSearch v${VERSION}..." + +docker build -t cloudsearch-app:v${VERSION} -t cloudsearch-app:latest . + +echo "✅ Built: cloudsearch-app:v${VERSION} + cloudsearch-app:latest" +echo " Run: docker-compose up -d app" diff --git a/source_clean/src/cloud/credential.service.ts b/source_clean/src/cloud/credential.service.ts index c547a9f..1ecd168 100644 --- a/source_clean/src/cloud/credential.service.ts +++ b/source_clean/src/cloud/credential.service.ts @@ -222,7 +222,8 @@ export async function testCloudConnection(id: number): Promise<{ return { success: false, message: 'Cookie not configured' }; } - const cookie = decryptCookie(config.cookie); + // config.cookie is already decrypted by getCloudConfigById + const cookie = config.cookie; try { let valid = false; diff --git a/source_clean/src/database/database.ts b/source_clean/src/database/database.ts index adb7ea0..9a3e1ee 100755 --- a/source_clean/src/database/database.ts +++ b/source_clean/src/database/database.ts @@ -309,6 +309,7 @@ function seedSystemConfigs(db: Database.Database): void { { key: 'site_marquee', value: '📢 欢迎使用CloudSearch,所有资源仅供学习交流,请于下载后24小时内删除', description: '搜索栏下方滚动通知文字(从右往左滚动显示)' }, { key: 'tmdb_api_token', value: '', description: 'TMDB API 读取令牌(用于增强豆瓣内容信息)' }, { key: 'ip_geo_api_url', value: '', description: 'IP 归属地查询接口({ip} 会被替换为实际IP,留空则禁用)' }, + { key: 'ip_geo_api_id', value: '', description: 'IP 归属地 API ID(apihz.cn 接口)' }, { key: 'ip_geo_api_key', value: '', description: 'IP 归属地备用 API Key(留空使用默认)' }, { key: 'title_filter_rules', value: '', description: '搜索结果标题过滤规则(一行一条:纯文本直接移除 / 正则用/包围/)' }, { key: 'timezone', value: 'Asia/Shanghai', description: '系统时区(如 Asia/Shanghai、America/New_York、UTC)' }, diff --git a/source_clean/src/routes/admin.routes.ts b/source_clean/src/routes/admin.routes.ts index f86b8b2..895eed8 100644 --- a/source_clean/src/routes/admin.routes.ts +++ b/source_clean/src/routes/admin.routes.ts @@ -508,7 +508,7 @@ router.post('/admin/test-external-service', async (req: Request, res: Response) break; } case 'tmdb': { - const tmdbToken = token || getSystemConfig('tmdb_api_key') || ''; + const tmdbToken = token || getSystemConfig('tmdb_api_token') || ''; if (!tmdbToken) { res.json({ ok: false, info: 'TMDB API Key not configured' }); return;