1bf6e62f2S猫头猫declare namespace IMusic { 2f782cf3dS猫头猫 export interface IMusicItemBase extends ICommon.IMediaBase { 3bf6e62f2S猫头猫 /** 其他属性 */ 4bf6e62f2S猫头猫 [k: keyof IMusicItem]: IMusicItem[k]; 5bf6e62f2S猫头猫 } 6bf6e62f2S猫头猫 7b7048bd1S猫头猫 /** 音质 */ 8b7048bd1S猫头猫 export type IQualityKey = 'low' | 'standard' | 'high' | 'super'; 9b7048bd1S猫头猫 export type IQuality = Record< 10b7048bd1S猫头猫 IQualityKey, 11b7048bd1S猫头猫 { 12b7048bd1S猫头猫 url?: string; 13cafdf1d5S猫头猫 size?: string | number; 14b7048bd1S猫头猫 } 15b7048bd1S猫头猫 >; 16b7048bd1S猫头猫 1743eb30bfS猫头猫 // 音源定义 1843eb30bfS猫头猫 export interface IMediaSource { 1943eb30bfS猫头猫 headers?: Record<string, string>; 2043eb30bfS猫头猫 /** 兜底播放 */ 2143eb30bfS猫头猫 url?: string; 2243eb30bfS猫头猫 /** UA */ 2343eb30bfS猫头猫 userAgent?: string; 2443eb30bfS猫头猫 /** 音质 */ 2543eb30bfS猫头猫 quality?: IMusic.IQualityKey; 2643eb30bfS猫头猫 /** 大小 */ 2743eb30bfS猫头猫 size?: number; 2843eb30bfS猫头猫 } 2943eb30bfS猫头猫 30bf6e62f2S猫头猫 export interface IMusicItem { 31bf6e62f2S猫头猫 /** 歌曲在平台的唯一编号 */ 32bf6e62f2S猫头猫 id: string; 33bf6e62f2S猫头猫 /** 平台 */ 34bf6e62f2S猫头猫 platform: string; 35bf6e62f2S猫头猫 /** 作者 */ 36bf6e62f2S猫头猫 artist: string; 37bf6e62f2S猫头猫 /** 标题 */ 38bf6e62f2S猫头猫 title: string; 39*1057be29S猫头猫 /** 别名 */ 40*1057be29S猫头猫 alias?: string; 41bf6e62f2S猫头猫 /** 时长(s) */ 42bf6e62f2S猫头猫 duration: number; 43bf6e62f2S猫头猫 /** 专辑名 */ 44bf6e62f2S猫头猫 album: string; 45bf6e62f2S猫头猫 /** 专辑封面图 */ 46bf6e62f2S猫头猫 artwork: string; 47b7048bd1S猫头猫 /** 默认音源 */ 48bf6e62f2S猫头猫 url?: string; 4943eb30bfS猫头猫 /** 音源 */ 5043eb30bfS猫头猫 source?: Partial<Record<IQualityKey, IMediaSource>>; 5143eb30bfS猫头猫 /** 歌词 */ 5243eb30bfS猫头猫 lyric?: ILyric.ILyricSource; 537e883dbbS猫头猫 /** @deprecated 歌词URL */ 540b940038S猫头猫 lrc?: string; 557e883dbbS猫头猫 /** @deprecated 歌词(原始文本 有时间戳) */ 562d0ec5c1S猫头猫 rawLrc?: string; 57b7048bd1S猫头猫 /** 音质信息 */ 58b7048bd1S猫头猫 qualities?: IQuality; 59bf6e62f2S猫头猫 /** 其他可以被序列化的信息 */ 60ccac153aS猫头猫 [k: string]: any; 6108a8e62cS猫头猫 /** 内部信息 */ 62ccac153aS猫头猫 [k: symbol]: any; 63bf6e62f2S猫头猫 } 6443eb30bfS猫头猫 6543eb30bfS猫头猫 export interface IMusicItemCache extends IMusicItem { 6643eb30bfS猫头猫 $localLyric?: ILyric.ILyricSource; 6743eb30bfS猫头猫 } 68bf6e62f2S猫头猫} 69