Skip to content

LyricsPlus & BetterLyrics providers, provider order, embedded-lyrics detection, batch UI overhaul - #7

Merged
DynamycSound merged 1 commit into
masterfrom
claude/github-issues-batch-download-ui-gfu6ne
Jul 16, 2026
Merged

LyricsPlus & BetterLyrics providers, provider order, embedded-lyrics detection, batch UI overhaul#7
DynamycSound merged 1 commit into
masterfrom
claude/github-issues-batch-download-ui-gfu6ne

Conversation

@DynamycSound

Copy link
Copy Markdown
Owner

Implements issues #4, #5 and #6, plus two batch-download UI improvements.

Issue #4 — LyricsPlus & BetterLyrics providers (word-by-word / TTML)

  • LyricsPlus (LyricsPlusAPI): queries /v2/lyrics/get across the 6 community mirrors from the issue, remembering the last working one. "Word" responses are converted into the app's enhanced-LRC dialect ([mm:ss.SSS] line stamps + <begin>word <end> inline timing, same shape as the Apple/QQ output), with v1:/v2: voice tags and [bg:...] background blocks in multi-person mode. "Line" responses become regular synced LRC.
  • BetterLyrics (BetterLyricsAPI): fetches Apple-style TTML from lyrics-api.boidu.dev and converts it via a new pure-Kotlin TtmlLyricsParser (word spans, syllable merging, ttm:agent voices, x-bg background vocals; translation/romanization spans skipped).
  • Both are direct-fetch providers (no search offsets), so the smart matcher got a dedicated searchDirect path: a hit may only auto-accept when the local duration was sent along (the service verified the length); otherwise it's capped at REVIEW. They also work as the selected provider in the single-song and quick-search flows.

Issue #5 — embedded lyrics not detected on the home page

  • New EmbeddedLyrics reader: reads the LYRICS/USLT tag via TagLib, memoised per file on (lastModified, length) so the full-library rescan on every Home resume stays cheap.
  • LrcPrescan gained an injectable embedded-lyrics fallback (new EMBEDDED_SYNCED / EMBEDDED_UNSYNCED results): a track with embedded synced lyrics now shows under "Has lyrics", and an embedded synced body outranks a plain sidecar .lrc.
  • The batch "skip songs with existing lyrics" check honours embedded synced lyrics too, and embedding lyrics from the app invalidates the cache entry.

Issue #6 — provider fallback chain in user-defined order

  • New Provider order section in Settings: reorder providers with arrows, untick to skip one. Persisted robustly (unknown names dropped, newly added providers appended).
  • The batch engine and the single-song search now walk exactly that chain, one provider at a time, until a match is found (the old adaptive "hot provider" reshuffling is gone so behaviour always matches what Settings shows). "Try every provider" off = only the first provider of the chain.

Batch download UI

  • The batch options popup is replaced by a full-screen setup page (nav destination like the progress screen) with the song count, all options as settings rows and a bottom Start button. Back from the progress screen returns straight to Home.
  • The Synced / Unsynced / Not found / Failed counters on the progress screen are now tappable: each opens a bottom drawer that rests at half the screen and can be dragged up to full height, listing the affected songs (album art, artist, provider). Tapping a song with lyrics opens the existing lyrics preview sheet.

Tests

  • New JVM tests: TtmlLyricsParserTest (parsing, syllable merging, LRC output, time formats), EmbeddedLyricsPrescanTest (embedded fallback precedence), ProviderOrderParsingTest (persistence round-trip).
  • testDebugUnitTest: 70 tests, all green except the pre-existing SuicideboysMatchTest, which queries the live LRCLib API and fails in this sandboxed environment independent of this diff.

Closes #4, closes #5, closes #6.

🤖 Generated with Claude Code

https://claude.ai/code/session_012b5krdonsAyKdwbAjhFxP8


Generated by Claude Code

…ics detection, batch UI overhaul

- Add LyricsPlus provider (issue #4): 6 community mirrors, word-by-word
  (enhanced LRC) and line-synced output, remembers the last working mirror
- Add BetterLyrics provider (issue #4): Apple-style TTML from
  lyrics-api.boidu.dev parsed by a new pure-Kotlin TTML parser with
  syllable merging, agents and background vocals
- Both are direct-fetch providers wired into the smart matcher with a
  duration-verified confidence cap, and into the single-song/quick-search
  flows
- Fix embedded-lyrics detection (issue #5): the home page scan now reads
  lyrics embedded in the audio tags (memoised TagLib reader), so
  embedded-only tracks no longer show as missing; batch skip-existing
  honours embedded synced lyrics too
- User-configurable provider fallback chain (issue #6): new Settings
  section to reorder/disable providers; batch and single-song searches
  walk that exact chain
- Batch download options are now a full page with a Start button instead
  of a popup dialog
- Synced/Unsynced/Not found/Failed counters on the batch progress screen
  are tappable and open a half-screen drawer (draggable to full) listing
  the affected songs; tapping a song previews its lyrics

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012b5krdonsAyKdwbAjhFxP8
@DynamycSound
DynamycSound merged commit 79ef89e into master Jul 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant