Skip to content

fix(lyrics): treat KuGou's instrumental notice as no lyrics - #342

Merged
A-EDev merged 5 commits into
Flow-Tube:mainfrom
AmyJeanes:pr/kugou-instrumental-placeholder
Nov 4, 2026
Merged

A-EDev merged 5 commits into
Flow-Tube:mainfrom
AmyJeanes:pr/kugou-instrumental-placeholder

Conversation

@AmyJeanes

@AmyJeanes AmyJeanes commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

KuGou answers instrumental tracks with a one-line lyric, "纯音乐,请欣赏" ("pure music, please enjoy"), so songs such as Ólafur Arnalds' "Happiness Does Not Wait" showed it as a synced lyric line instead of "Lyrics not available".

  • lyricsUtils.ts: isInstrumentalNotice matches an answer made only of that notice (full-width or ASCII comma). Lyrics that merely contain the phrase are kept.
  • kugou.ts: getLyrics stops at the notice and returns no lyrics, so the lookup moves on to the next provider. KuGou's other matches for the title can be a vocal version of the song, so they are not tried.
  • lyricsHelper.ts: a notice already in the disk cache is evicted when it is read, so it stops coming back as the fallback.
  • Tests: 1 case in providers.test.ts, using the file KuGou actually serves (every instrumental points at the same lyric id, 19525574), 3 in a new kugou.test.ts for the search, and 2 in lyricsHelper.test.ts for the cache.

Android parity: Flow-Android has the same bug; the matching fix is Flow-Tube/Flow#1573, with the same check in KuGouLyricsProvider. Android downloads one candidate, so it stops at the notice the same way. Other apps have hit it too (kushagrasinghx/BitChord#716).

Related issue

None filed.

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Documentation
  • Build, packaging, or CI

Validation

Windows 11 x64.

  • pnpm test (212 files, 1243 tests passed, with main merged at 01e0869, on macOS)
  • pnpm build (also on macOS with main merged)
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check (no Rust changes)
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features (no Rust changes)
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features (no Rust changes)
  • I smoke-tested the affected desktop behavior.

Smoke test: played "Happiness Does Not Wait" on a build of main and on this branch. main shows "纯音乐,请欣赏" in the lyrics pane; this branch shows "Lyrics not available".

Live KuGou lookups on the final branch, provider only: 7 instrumental songs, including "Nuvole Bianche" at 357 s, each return no lyrics in 3 requests.

Screenshots or recordings

main on top, this branch below:

kugou-before kugou-after

Risk and compatibility

Frontend only, limited to KuGou's answers and the lyrics cache entries that hold its notice. No migrations, database or permissions changes. Network use is unchanged from main: 3 requests for an instrumental. No overlap with other open PRs.

AI disclosure: This PR was largely written by Claude (Opus 5.5) but was fully reviewed and tested by myself before raising this.

  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.
  • User-facing documentation was updated where needed. (not needed)
  • Dependency and lockfile changes are intentional and limited to this PR. (none)
  • Breaking changes and upgrade steps are clearly documented. (none)

KuGou answers instrumental tracks with a one-line lyric, "纯音乐,请欣赏"
("pure music, please enjoy"), which showed as a synced lyric line. Treat an
answer made only of that notice as no lyrics, so the lookup moves on to the
next provider or shows "Lyrics not available". Lyrics that merely contain
the phrase are kept.

Notices already in the lyrics cache stay until the cache is cleared in
Settings; evicting them was left out to keep the fix to the provider.

Assisted-by: Claude Code (Claude Opus 5.5)
A-EDev and others added 4 commits November 5, 2026 00:26
@A-EDev
A-EDev merged commit 1897251 into Flow-Tube:main Nov 4, 2026
7 checks passed
@AmyJeanes
AmyJeanes deleted the pr/kugou-instrumental-placeholder branch November 5, 2026 16:45
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.

2 participants