-
-
Notifications
You must be signed in to change notification settings - Fork 191
lyrics: add translation lyrics for netease.ts #951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Considering users using netease for lyric search only need a original version of lyric , adding netease_translate.ts may be a probable option |
First of all, thank you for the PR. This functionality is useful, but it needs to be configurable to be enabled/disabled since there are users who will not want to see the included translations. Please add a settings option in the UI under |
the setting option is easpecially for netease lyric(cuz only netease has translation lyric) and will it be confilicting with the existing api-translate option? So i wonder weather its suitable to add it globally in the lyric-settings (or merge it). And maybe we should ask @kgarner7 for further information. |
You just need to make the new setting conditional based on if It should not conflict with any of the existing settings. |
What is the motivation for this change?
Currently, the NetEase lyrics provider (
netease.ts
) only fetches the original lyrics (lrc
) and ignores available translated lyrics (tlyric
). This prevents users from seeing translations for many songs, especially CJK (Chinese, Japanese, Korean) pop music, even when the translations exist on the NetEase platform.This PR aims to resolve this issue by enabling support for translated lyrics from NetEase.
What is the new behavior?
getLyricsBySongId
function innetease.ts
now fetches both original (lrc
) and translated (tlyric
) lyrics from the NetEase API.[00:12.34]Original Text
becomes two lines in the output string:This approach was chosen to keep the function's public contract (Promise<string | null>) unchanged, ensuring minimal and non-breaking changes for higher chances of acceptance.
How to test the new behavior?
Check out this branch.
Run the app in production preview mode (pnpm run start).
Play a song that has a known translation on NetEase (e.g., "Lemon" by Kenshi Yonezu, ID: 536622451).