emby支持多源

This commit is contained in:
mtvpls
2026-01-08 00:31:03 +08:00
parent b61db02478
commit 2736c9e845
22 changed files with 1316 additions and 572 deletions
+27 -10
View File
@@ -156,16 +156,33 @@ export interface AdminConfig {
SystemPrompt?: string; // 自定义系统提示词
};
EmbyConfig?: {
Enabled: boolean; // 是否启用Emby媒体库功能
ServerURL: string; // Emby服务器地址
ApiKey?: string; // API Key(推荐方式)
Username?: string; // 用户名(或使用API Key
Password?: string; // 密码
UserId?: string; // 用户ID(登录后获取)
AuthToken?: string; // 认证令牌(用户名密码登录后获取
Libraries?: string[]; // 要显示的媒体库ID(可选,默认全部
LastSyncTime?: number; // 最后同步时间戳
ItemCount?: number; // 媒体项数量
// 新格式:多源配置(推荐)
Sources?: Array<{
key: string; // 唯一标识,如 'emby1', 'emby2'
name: string; // 显示名称,如 '家庭Emby', '公司Emby'
enabled: boolean; // 是否启用
ServerURL: string; // Emby服务器地址
ApiKey?: string; // API Key(推荐方式
Username?: string; // 用户名(或使用API Key
Password?: string; // 密码
UserId?: string; // 用户ID(登录后获取)
AuthToken?: string; // 认证令牌(用户名密码登录后获取)
Libraries?: string[]; // 要显示的媒体库ID(可选,默认全部)
LastSyncTime?: number; // 最后同步时间戳
ItemCount?: number; // 媒体项数量
isDefault?: boolean; // 是否为默认源(用于向后兼容)
}>;
// 旧格式:单源配置(向后兼容)
Enabled?: boolean;
ServerURL?: string;
ApiKey?: string;
Username?: string;
Password?: string;
UserId?: string;
AuthToken?: string;
Libraries?: string[];
LastSyncTime?: number;
ItemCount?: number;
};
}