Skip to content

Commit 06cf6c3

Browse files
committed
🐞 fix: 修复后处理
1 parent 47d5c19 commit 06cf6c3

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

src/core/player/LyricManager.ts

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -405,19 +405,12 @@ class LyricManager {
405405
}
406406
await Promise.all([adoptTTML(), adoptLRC()]);
407407
}
408-
409408
// 设置元数据状态
410409
meta.usingTTMLLyric = ttmlAdopted;
411410
meta.usingQRCLyric = qqMusicAdopted && !ttmlAdopted;
412411

413-
// 处理排除
414-
let processedData = result;
415-
if (settingStore.enableExcludeLyricsLocal) {
416-
processedData = this.handleLyricExclude(result, song);
417-
}
418-
419412
return {
420-
data: await this.applyChineseVariant(processedData),
413+
data: result,
421414
meta,
422415
};
423416
}
@@ -936,6 +929,8 @@ class LyricManager {
936929
};
937930

938931
try {
932+
// 判断歌词来源
933+
const isLocal = Boolean(song.path) || false;
939934
if (isStreaming) {
940935
fetchResult = await this.fetchStreamingLyric(song);
941936
} else {
@@ -949,16 +944,15 @@ class LyricManager {
949944
// 本地文件
950945
fetchResult = await this.fetchLocalLyric(song);
951946
} else {
952-
// 在线获取 (已包含排除和变体处理)
947+
// 在线获取
953948
fetchResult = await this.fetchOnlineLyric(song);
954-
return fetchResult;
955949
}
956950
}
957-
958-
// 对于非 fetchOnlineLyric 的结果,需要统一处理排除和变体
959-
if (settingStore.enableExcludeLyricsLocal) {
951+
// 后处理:元数据排除
952+
if (isLocal ? settingStore.enableExcludeLyricsLocal : true) {
960953
fetchResult.data = this.handleLyricExclude(fetchResult.data, song);
961954
}
955+
// 后处理:简繁转换
962956
fetchResult.data = await this.applyChineseVariant(fetchResult.data);
963957

964958
return fetchResult;

0 commit comments

Comments
 (0)