Skip to content

fix: autofetch via LrcLib + state-aware "no lyrics" message - #7

Merged
slashome merged 1 commit into
mainfrom
fix/autofetch-lrclib
Jul 16, 2026
Merged

slashome merged 1 commit into
mainfrom
fix/autofetch-lrclib

Conversation

@slashome

Copy link
Copy Markdown
Owner

Problem

Since the interactive f picker landed in #6, the automatic (silent) autofetch appeared to stop working: opening the f panel found lyrics, but the autofetch reported "not found" for the same track.

Root cause: the f panel queries LrcLib directly (the most reliable synced-lyrics source), while the autofetch still relied solely on syncedlyrics.search(synced_only=True), which frequently returns nothing.

Changes

  • simple_search() (used by the autofetch) now tries LrcLib first — the same source as the f panel — returning the first synced LRC it finds, then falls back to the syncedlyrics providers.
  • _start_autofetch() no longer bails with no_module when syncedlyrics is absent: LrcLib (via requests) alone is enough.
  • The empty-lyrics message is now state-aware:
    • searching → Searching lyrics online…
    • autofetch found nothing / failed → clearly says so + press f
    • autofetch disabled/unavailable → the original press f to fetch… hint (unchanged)
  • Version bumped to 0.5.1.

Test

Live check against LrcLib confirmed _lrclib_first_synced("Bohemian Rhapsody Queen") returns a 2502-char synced LRC.

🤖 Generated with Claude Code

The interactive `f` picker added in #6 queries LrcLib directly (the most
reliable synced-lyrics source), but the silent autofetch still only used
`syncedlyrics.search(synced_only=True)`, which frequently returns nothing.
So the picker found lyrics while the autofetch reported "not found" — it
looked like autofetch had stopped working.

- simple_search() now tries LrcLib first (same source as the `f` panel),
  then falls back to the syncedlyrics providers.
- _start_autofetch() no longer bails with "no_module" when syncedlyrics is
  absent: LrcLib (requests) alone is enough.
- The empty-lyrics message now reflects the autofetch state: searching…,
  autofetch found nothing / failed → press f, and the plain hint when
  autofetch is disabled/unavailable.

Bump version to 0.5.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@slashome
slashome merged commit ebac6fa into main Jul 16, 2026
1 check passed
@slashome
slashome deleted the fix/autofetch-lrclib branch July 16, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant