Added a feature to try to detect the language of lyrics. The language…#4324
Added a feature to try to detect the language of lyrics. The language…#4324halleck1 wants to merge 24 commits intopear-devs:masterfrom
Conversation
… would by default be shown in the Lyrics panel and the songs can be optionally skipped and/or disliked
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds lyrics language detection to the Synced Lyrics plugin, surfaces the detected language in the UI, and introduces optional auto-skip/auto-dislike behavior based on a configurable list of language codes.
Changes:
- Extend lyrics results with an optional
languagefield and plugin config with auto-skip/auto-dislike options. - Detect lyrics language (via
tinyld) during provider fetches and display it as a badge in the Lyrics picker UI. - Add menu entries + i18n strings for configuring auto-skip languages and whether to dislike before skipping.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/plugins/synced-lyrics/types.ts |
Adds config fields and LyricResult.language to support language-based behavior and display. |
src/plugins/synced-lyrics/style.css |
Introduces styling for provider+language display and the language badge. |
src/plugins/synced-lyrics/renderer/store.ts |
Adds language detection during lyric fetch/retry and stores it on results. |
src/plugins/synced-lyrics/renderer/renderer.tsx |
Implements auto-skip/auto-dislike behavior based on detected lyric language. |
src/plugins/synced-lyrics/renderer/components/LyricsPicker.tsx |
Displays detected language badge under the provider name. |
src/plugins/synced-lyrics/menu.ts |
Adds menu items + prompt/checkbox to configure auto-skip and auto-dislike. |
src/i18n/resources/en.json |
Adds English strings for the new menu items and prompt labels. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… result so it does not depend now on the lyrics panel being open
…leck1/pear-desktop into synced-lyrics-skip-languages
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…leck1/pear-desktop into synced-lyrics-skip-languages
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey @JellyBrick just wondering if you plan to merge this into master? I'd guess a lot of users could like the feature, at least in our country. |
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughImplemented language-detection and auto-skip features for the Synced Lyrics plugin. Detects lyrics language, exposes best language result, adds menu options to configure auto-skip and dislike behaviors, and automatically skips tracks matching specified languages with optional dislike action. ChangesLanguage-Based Auto-Skip Feature
Sequence DiagramsequenceDiagram
participant Lyrics as Lyrics Store
participant Renderer as Renderer/Auto-skip
participant Config as Plugin Config
participant Player as Player API
participant UI as Toast UI
Lyrics->>Lyrics: Detect & store language<br/>from lyric text
Lyrics->>Renderer: Emit bestLanguageResult
Renderer->>Config: Check autoSkipLanguages<br/>setting
alt Language matches configured
Renderer->>UI: Show auto-skip toast
alt autoDislikeSkipped enabled
Renderer->>Player: Dislike current track
end
Renderer->>Renderer: Schedule skip to next<br/>video (with delay)
Renderer->>Player: Trigger skip
Renderer->>Renderer: Track last skipped ID<br/>(prevent repeats)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… would by default be shown in the Lyrics panel and the songs can be optionally skipped and/or disliked
Summary by CodeRabbit