修改待看名单存储位置

This commit is contained in:
2025-09-08 07:38:54 +08:00
parent d44111320b
commit 5a134e39cd
2 changed files with 2 additions and 4 deletions
-2
View File
@@ -66,8 +66,6 @@ data/
# 用户配置文件 # 用户配置文件
backend/config/user-config.json backend/config/user-config.json
# 待看名单
backend/config/watchlist.json
# 自己的启动文件 # 自己的启动文件
start_me.bat start_me.bat
+2 -2
View File
@@ -18,8 +18,8 @@ class WatchlistManager {
// 在打包环境中,使用可执行文件所在目录 // 在打包环境中,使用可执行文件所在目录
this.configDir = path.join(process.cwd(), 'data', 'watchlist.json') this.configDir = path.join(process.cwd(), 'data', 'watchlist.json')
} else { } else {
// 在开发环境中,使用相对路径 // 在开发环境中,使用项目根目录的data文件夹
this.configDir = path.join(__dirname, 'watchlist.json') this.configDir = path.join(__dirname, '..', '..', 'data', 'watchlist.json')
} }
// 确保配置目录存在 // 确保配置目录存在