Skip to content

Added a feature to try to detect the language of lyrics. The language…#4324

Open
halleck1 wants to merge 24 commits intopear-devs:masterfrom
halleck1:synced-lyrics-skip-languages
Open

Added a feature to try to detect the language of lyrics. The language…#4324
halleck1 wants to merge 24 commits intopear-devs:masterfrom
halleck1:synced-lyrics-skip-languages

Conversation

@halleck1
Copy link
Copy Markdown

@halleck1 halleck1 commented Feb 16, 2026

… would by default be shown in the Lyrics panel and the songs can be optionally skipped and/or disliked

Summary by CodeRabbit

  • New Features
    • Introduced language detection for synced lyrics with visual language badges displayed in the lyrics picker.
    • Added auto-skip feature to automatically skip songs in specified languages.
    • Added option to auto-dislike skipped songs before advancing to the next track.
    • Added configuration menu items to customize language auto-skip settings.

Volodymyr Tymchenko and others added 11 commits February 16, 2026 12:53
… 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 language field 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.

Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Comment thread src/plugins/synced-lyrics/renderer/store.ts
Comment thread src/plugins/synced-lyrics/menu.ts Outdated
Volodymyr Tymchenko and others added 2 commits February 27, 2026 18:06
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Volodymyr Tymchenko added 2 commits March 2, 2026 14:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Volodymyr Tymchenko and others added 2 commits March 2, 2026 15:12
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Comment thread src/plugins/synced-lyrics/renderer/store.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx Outdated
Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx
Comment thread src/plugins/synced-lyrics/style.css
Comment thread src/plugins/synced-lyrics/types.ts Outdated
Comment thread src/i18n/resources/en.json Outdated
Volodymyr Tymchenko and others added 2 commits March 2, 2026 16:23
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/plugins/synced-lyrics/renderer/renderer.tsx Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@halleck1
Copy link
Copy Markdown
Author

halleck1 commented May 6, 2026

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

Implemented 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.

Changes

Language-Based Auto-Skip Feature

Layer / File(s) Summary
Types & Configuration
src/plugins/synced-lyrics/types.ts, src/plugins/synced-lyrics/index.ts
Extended SyncedLyricsPluginConfig with autoSkipLanguages (comma-separated language codes) and autoDislikeSkippedLanguages (boolean). Added optional language field to LyricResult.
Language Detection
src/plugins/synced-lyrics/renderer/store.ts
Implemented detectLyricsLanguage helper using tinyld to detect language from lyric text. Exported bestLanguageResult memo to surface the best available provider language. Language data flows through fetch and retry paths.
Menu & Config Input
src/plugins/synced-lyrics/menu.ts
Added "auto-skip-languages" menu item that opens an Electron prompt to collect comma-separated language codes, with fallback to existing value on cancel.
Auto-skip Engine
src/plugins/synced-lyrics/renderer/renderer.tsx
Monitors bestLanguageResult and triggers auto-skip when detected language matches configured autoSkipLanguages. Shows toast notification, optionally dislikes via player API, and schedules skip with tracking to prevent repeat skips.
UI & Display
src/plugins/synced-lyrics/renderer/components/LyricsPicker.tsx, src/plugins/synced-lyrics/style.css
Wrapped provider name in provider-info container and conditionally render language badge. Added CSS for .provider-info (flex column, centered) and .language-badge (inline badge with padding, uppercase, translucent background).
Internationalization
src/i18n/resources/en.json
Added translation keys: synced-lyrics.menu.auto-skip-languages (label, tooltip, prompt), synced-lyrics.menu.auto-dislike-skipped-languages (label, tooltip, prompt), and synced-lyrics.toast.auto-skip (notification message).

Sequence Diagram

sequenceDiagram
    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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit hops through lyrics bright,
Detects each language, left and right,
When tongues align with wishes true,
Skip to the next with grateful view!
Language badges bloom on screen,
The finest synced-up tune you've seen.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main feature being added—language detection for lyrics—which aligns with the comprehensive changes across multiple files implementing this functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants