fix type error

This commit is contained in:
mtvpls
2026-01-08 01:36:16 +08:00
parent 4474c0c6f9
commit 9e8e3a4cc5
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -503,7 +503,7 @@ export function configSelfCheck(adminConfig: AdminConfig): AdminConfig {
key: 'default',
name: 'Emby',
enabled: oldConfig.Enabled ?? false,
ServerURL: oldConfig.ServerURL,
ServerURL: oldConfig.ServerURL || '',
ApiKey: oldConfig.ApiKey,
Username: oldConfig.Username,
Password: oldConfig.Password,
@@ -518,7 +518,7 @@ export function configSelfCheck(adminConfig: AdminConfig): AdminConfig {
}
// Emby源去重
if (adminConfig.EmbyConfig.Sources) {
if (adminConfig.EmbyConfig?.Sources) {
const seenEmbyKeys = new Set<string>();
adminConfig.EmbyConfig.Sources = adminConfig.EmbyConfig.Sources.filter((source) => {
if (seenEmbyKeys.has(source.key)) {
+1 -1
View File
@@ -164,7 +164,7 @@ export function migrateEmbyConfig(config: AdminConfig): AdminConfig {
key: 'default',
name: 'Emby',
enabled: oldConfig.Enabled ?? false,
ServerURL: oldConfig.ServerURL,
ServerURL: oldConfig.ServerURL || '',
ApiKey: oldConfig.ApiKey,
Username: oldConfig.Username,
Password: oldConfig.Password,