音乐模块调整
This commit is contained in:
+30
-2
@@ -254,7 +254,18 @@ export const commands = {
|
||||
musicStopBridge: () => __TAURI_INVOKE<null>("music_stop_bridge"),
|
||||
/** 读取音乐模块设置 */
|
||||
musicGetSettings: () => __TAURI_INVOKE<MusicSettings>("music_get_settings"),
|
||||
/** 保存音乐模块设置(立即生效) */
|
||||
/**
|
||||
* 保存音乐模块设置(立即生效)
|
||||
*
|
||||
* 飞牛音乐**连接相关字段一律以磁盘为准**,不接受前端传值:
|
||||
* 连接列表 / 激活连接 / 旧版单连接字段只由 `feiniu_save_connection`、
|
||||
* `feiniu_activate_connection`、`feiniu_delete_connection`、`feiniu_login`
|
||||
* 等专用命令维护。
|
||||
*
|
||||
* 原因:前端 `musicStore` 只在 init 时读一次整份设置并长期复用快照,
|
||||
* 若允许它整份回写,删除连接后任意一次设置保存(哪怕是切页触发的)
|
||||
* 都会把已删除的连接从旧快照里写回来。
|
||||
*/
|
||||
musicSaveSettings: (settings: MusicSettings) => __TAURI_INVOKE<null>("music_save_settings", { settings }),
|
||||
/** 禁用指定窗口(按 label 查找)的显示/隐藏过渡动画,消除覆盖层出现/消失时的缩放动画 */
|
||||
screenshotDisableTransitions: (label: string) => __TAURI_INVOKE<null>("screenshot_disable_transitions", { label }),
|
||||
@@ -567,6 +578,11 @@ export type FeiniuConnection = {
|
||||
insecure: boolean,
|
||||
/** fnconnect 连接的 fnId(如 fnos.net/<id> 或裸 id) */
|
||||
fnId?: string,
|
||||
/**
|
||||
* 是否经由 FnConnect 中继链路(`<fnId>.fnos.net`)。
|
||||
* 中继要求所有请求携带 `Cookie: mode=relay`,否则网关 302 回登录页。
|
||||
*/
|
||||
relay?: boolean,
|
||||
};
|
||||
|
||||
export type FileEntry = {
|
||||
@@ -623,6 +639,13 @@ export type MusicEnvStatus = {
|
||||
musicdlInstalled: boolean,
|
||||
/** musicdl 版本 */
|
||||
musicdlVersion: string | null,
|
||||
/** 本应用锁定的 musicdl 版本(`MUSICDL_VERSION`):是否过期、更新到哪个版本都以它为准 */
|
||||
musicdlExpected: string,
|
||||
/**
|
||||
* 已装 musicdl 是否与锁定版本不一致。
|
||||
* 未安装时恒为 false(那是「安装」引导的事,不是「更新」)。
|
||||
*/
|
||||
musicdlOutdated: boolean,
|
||||
/** FFmpeg 是否可用(部分音源需要,非必需) */
|
||||
ffmpeg: string | null,
|
||||
/** 桥接进程是否在运行 */
|
||||
@@ -651,6 +674,11 @@ export type MusicSettings = {
|
||||
selectQualityOnDownload: boolean,
|
||||
/** 下载时默认音质:"" 表示最高;否则为搜索音质档位 label(如 "无损"、"320K") */
|
||||
defaultDownloadQuality: string,
|
||||
/**
|
||||
* QQ 音乐 Cookie(可选):用于解析需要登录的歌单(含自己的隐私歌单)与 VIP 音质。
|
||||
* 传给 musicdl 的 default_search/parse/download_cookies;空=游客身份。
|
||||
*/
|
||||
qqCookie?: string,
|
||||
/** 飞牛音乐(NAS)连接:服务器地址(如 http://192.168.1.10:5666,空=未配置) */
|
||||
feiniuBaseUrl?: string,
|
||||
/** 飞牛音乐登录 token(登录成功后保存) */
|
||||
@@ -661,7 +689,7 @@ export type MusicSettings = {
|
||||
feiniuDeviceId?: string,
|
||||
/** 飞牛音乐访问安全码(可选;仅需访问码的库才填,LAN 通常为空) */
|
||||
feiniuAccessCode?: string,
|
||||
/** 飞牛音乐连接列表(多连接:本地 / frp / 预留 fnconnect) */
|
||||
/** 飞牛音乐连接列表(多连接:局域网 / FnConnect) */
|
||||
feiniuConnections?: FeiniuConnection[],
|
||||
/** 当前激活连接的 id */
|
||||
feiniuActiveId?: string,
|
||||
|
||||
Reference in New Issue
Block a user