From 5db3ccc6a1f3366ae18e5e32c8c4b4ad32af8436 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 11 Aug 2026 11:39:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(music):=20=E9=9F=B3=E4=B9=90=E8=AE=A2?= =?UTF-8?q?=E9=98=85=E5=88=B7=E6=96=B0=E4=B8=8E=E8=AF=86=E5=88=AB=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/types.ts | 32 + .../cache/MusicRecognitionCachePanel.vue | 778 ++++++++++++++++++ .../cache/RecognitionCachePanel.vue | 503 ++++++----- .../MusicRecognitionCachePanel.spec.ts | 126 +++ src/locales/en-US.ts | 12 + src/locales/zh-CN.ts | 12 + src/locales/zh-TW.ts | 12 + 7 files changed, 1258 insertions(+), 217 deletions(-) create mode 100644 src/components/cache/MusicRecognitionCachePanel.vue create mode 100644 src/components/cache/__tests__/MusicRecognitionCachePanel.spec.ts diff --git a/src/api/types.ts b/src/api/types.ts index d38f4084..7c2dfef3 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -2191,6 +2191,38 @@ export interface RecognitionCacheData { data: RecognitionCacheItem[] } +// 音乐识别缓存项 +export interface MusicRecognitionCacheItem { + // 缓存键 + key: string + // MusicBrainz ID,空字符串表示未识别 + media_id?: string + // 识别后的曲名/专辑名 + title: string + // 艺术家列表 + artists?: string[] + // 所属专辑 + album?: string + // 发行年份 + year?: string | number + // 音乐实体类型:recording/album/artist + music_type?: string + // 封面图片地址 + cover_url?: string +} + +// 音乐识别缓存数据 +export interface MusicRecognitionCacheData { + // 缓存总数 + count: number + // 已识别数量 + recognized: number + // 未识别数量 + unrecognized: number + // 缓存数据 + data: MusicRecognitionCacheItem[] +} + // 订阅分享统计 export interface SubscribeShareStatistics { // 分享人 diff --git a/src/components/cache/MusicRecognitionCachePanel.vue b/src/components/cache/MusicRecognitionCachePanel.vue new file mode 100644 index 00000000..8c548268 --- /dev/null +++ b/src/components/cache/MusicRecognitionCachePanel.vue @@ -0,0 +1,778 @@ + + +