Skip to content

Commit 00199ce

Browse files
authored
feat(lyrics-plus/netease): implement below-mode for netease (#3404)
1 parent 2d38dc7 commit 00199ce

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CustomApps/lyrics-plus/Providers.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ const Providers = {
125125
result.unsynced = unsynced;
126126
}
127127
const translation = ProviderNetease.getTranslation(list);
128-
if (translation) {
129-
result.neteaseTranslation = translation;
128+
if ((synced || unsynced) && Array.isArray(translation)) {
129+
const baseLyrics = synced ?? unsynced;
130+
result.neteaseTranslation = baseLyrics.map((line) => ({
131+
...line,
132+
text: translation.find((t) => t.startTime === line.startTime)?.text ?? line.text,
133+
originalText: line.text,
134+
}));
130135
}
131136

132137
return result;

0 commit comments

Comments
 (0)