mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-11 00:01:55 +08:00
fix(ci): repair initialization regressions
This commit is contained in:
@@ -227,6 +227,7 @@
|
||||
"密码需要同时包含字母、数字、特殊字符中的至少两项,且长度大于6位": "Password must contain at least two of letters, numbers, and special characters, and be longer than 6 characters",
|
||||
"用户名不能为空": "Username cannot be empty",
|
||||
"用户名已被使用": "Username is already in use",
|
||||
"系统已经完成初始化": "The system has already been initialized",
|
||||
"必须保留至少一个启用的超级管理员": "At least one active superuser must remain",
|
||||
"用户不存在": "User does not exist",
|
||||
"已存在相同名称的工作流": "A workflow with the same name already exists",
|
||||
|
||||
@@ -223,6 +223,7 @@
|
||||
"密码需要同时包含字母、数字、特殊字符中的至少两项,且长度大于6位": "密碼需同時包含字母、數字、特殊字元中的至少兩項,且長度大於 6 位",
|
||||
"用户名不能为空": "使用者名稱不能為空",
|
||||
"用户名已被使用": "使用者名稱已被使用",
|
||||
"系统已经完成初始化": "系統已完成初始化",
|
||||
"必须保留至少一个启用的超级管理员": "必須保留至少一個啟用的超級管理員",
|
||||
"用户不存在": "使用者不存在",
|
||||
"已存在相同名称的工作流": "已存在相同名稱的工作流",
|
||||
|
||||
@@ -252,9 +252,10 @@ class Jellyfin:
|
||||
for user in users:
|
||||
if user.get("Name") == user_name:
|
||||
return user.get("Id")
|
||||
if user_name == get_runtime_setting('SUPERUSER'):
|
||||
if user_name:
|
||||
logger.warning(
|
||||
"MoviePilot 当前配置的超级管理员用户名为 {},请确保Jellyfin中存在同名管理员账号,否则可能无法正常使用部分功能!".format(get_runtime_setting('SUPERUSER'))
|
||||
f"未找到指定的 Jellyfin 用户账号 {user_name},"
|
||||
"将回退选择可用的超级管理员账号!"
|
||||
)
|
||||
# 查询管理员,优先选择同时具备全库访问能力的账号,再回退到普通管理员。
|
||||
# 获取总媒体库数量
|
||||
@@ -280,7 +281,9 @@ class Jellyfin:
|
||||
logger.warning("未找到可用的管理员账号,无法获取管理员用户,请检查Jellyfin用户及权限配置!")
|
||||
return None
|
||||
logger.warning(
|
||||
f"未找到具备全库访问权限的管理员账号,回退使用仅可访问{best_admin_library_count}/{total_library_count}个媒体库的管理员账号{best_admin_name}!"
|
||||
"未找到具备全库访问权限的管理员账号,"
|
||||
f"回退使用显式访问范围为 {best_admin_library_count}/{total_library_count} "
|
||||
f"个媒体库的管理员账号 {best_admin_name}!"
|
||||
)
|
||||
return best_admin_id
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user