Skip to content

feat(lyrics): add a setting to turn the lookup off - #780

Merged
LargeModGames merged 1 commit into
mainfrom
feat/lyrics-setting
Oct 12, 2026
Merged

LargeModGames merged 1 commit into
mainfrom
feat/lyrics-setting

Conversation

@LargeModGames

@LargeModGames LargeModGames commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds behavior.enable_lyrics (Settings > Lyrics, on by default), shown in the terminal Settings and on the desktop app's Settings page. Until now every track change sent the title, artist and length to LRCLIB (or to Spotify for Spotify tracks) with no way to stop it. SignPath Foundation requires an off switch for every feature that sends data, and the privacy policy lists this one.

With the setting off, the driver still records the track as the lyrics identity but publishes NotFound instead of dispatching GetLyrics, so the lyrics view and the plugin get_lyrics callback resolve at once instead of waiting forever. The lookup moved into request_track_lyrics so the decision is testable without a playing track.

Testing

  • cargo fmt --all
  • cargo clippy --no-default-features --features telemetry,tui -- -D warnings: clean
  • cargo clippy --no-default-features --features telemetry -- -D warnings: clean
  • cargo test --no-default-features --features telemetry,tui: 1515 passed, including the two new tests
  • cargo test (default features): 1971 passed, 7 ignored
  • cargo test --no-default-features --features telemetry,gui,streaming,discord-rpc,self-update,scripting,mcp-server (the gui leg without mpris, on Windows): 1678 passed, bindings unchanged

Additional notes

Turning the setting on or off takes effect at the next track change. The wiki's Configuration page needs a row for enable_lyrics after the merge.

This PR and the desktop update check PR both add the ## [Unreleased] header to CHANGELOG.md, so the second one to merge needs a rebase.


💬 Questions or want to chat with other contributors? Join the spotatui Discord.

Summary by CodeRabbit

  • New Features
    • Added a saved setting in terminal and desktop Settings to enable or disable lyrics lookup. Lyrics lookup is enabled by default.
    • When disabled, track title, artist, and length are not sent to LRCLIB or, for Spotify tracks, Spotify. The lyrics view reports that no lyrics were found.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 448e2fc1-3b7f-4f92-abd7-50c472979323

📥 Commits

Reviewing files that changed from the base of the PR and between 4deea38 and 4d71b21.


📒 Files selected for processing (1)
  • CHANGELOG.md

🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The change adds a persisted behavior.enable_lyrics setting that defaults to enabled and is available in terminal and desktop Settings. When disabled, track changes do not dispatch lyrics lookups. The driver records the desired lyrics identity and sets lyrics to NotFound.

Changes

Lyrics setting and lookup

Layer / File(s) Summary
Persist and expose the lyrics setting
src/core/user_config.rs, src/core/app/settings_schema.rs, src/core/app/settings_apply.rs, src/gui/protocol.rs, CHANGELOG.md
The behavior configuration stores enable_lyrics, defaults it to true, and loads and saves its value. Terminal and desktop Settings expose the toggle, and settings changes apply its Boolean value. The changelog describes the setting and its lookup behavior.
Apply the setting to track-change lookups
src/core/driver/mod.rs
Track changes use request_track_lyrics. When lyrics are enabled, it dispatches GetLyrics with the duration and optional Spotify ID. When disabled, it records the desired identity, sets lyrics to NotFound, and bumps the lyrics generation without dispatching a lookup. Tests cover both outcomes.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant TrackChange
  participant Driver
  participant UserConfig
  participant LyricsDispatch
  participant LyricsState
  TrackChange->>Driver: call request_track_lyrics
  Driver->>UserConfig: read behavior.enable_lyrics
  alt Lyrics enabled
    Driver->>LyricsDispatch: dispatch GetLyrics with duration and optional Spotify ID
  else Lyrics disabled
    Driver->>LyricsState: set NotFound and bump lyrics generation
  end
Loading

Merge Risk: ⚪ Minimal · up to 4d71b

Disabled lyrics lookups do not send Spotify track-change details to the lyrics services. The change is mergeable after normal checks.

Pre-merge checks · Passed 4
Passed Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the allowed conventional-commit prefix feat(lyrics):, clearly describes the added setting, and uses a concise imperative subject.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

✨ Simplify code
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/driver/mod.rs 90.2% 4 Missing ⚠️
src/core/user_config.rs 75.0% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit 0e4ee58 into main Oct 12, 2026
37 checks passed
@LargeModGames
LargeModGames deleted the feat/lyrics-setting branch October 12, 2026 20:27
LargeModGames added a commit that referenced this pull request Oct 12, 2026
# Summary

With `behavior.disable_auto_update` on, the desktop app still asked
GitHub for a new release at launch and every 6 hours, and only skipped
the download. The terminal app already skips the whole check. Now the
desktop app does too: the timed check runs only while auto-update is on,
and Check for updates on the Settings page still works. SignPath
Foundation requires an off switch for every feature that sends data, and
the privacy policy lists this one.

Two small functions in `src/runtime/gui.rs` hold the decision:
- `scheduled_check`: the launch and 6-hour check, `None` while
auto-update is off.
- `changed_check`: what a settings change sends. After an earlier check
it sends the new settings when they differ (as before, so turning
auto-update off still clears the updater's auto-download flag). With no
earlier check it sends the first check once auto-update is turned on, so
turning it back on looks at once instead of after 6 hours.

The Settings description and the e2e fixture now say the check is
manual.

# Testing

- `cargo fmt --all`
- `cargo clippy --no-default-features --features telemetry,tui -- -D
warnings`: clean
- `cargo clippy --no-default-features --features
telemetry,gui,streaming,discord-rpc,self-update,scripting,mcp-server --
-D warnings`: clean
- `cargo test --no-default-features --features
telemetry,gui,streaming,discord-rpc,self-update,scripting,mcp-server`:
1679 passed, including the three new `runtime::gui` tests
- `cargo clippy --manifest-path desktop/Cargo.toml -- -D warnings`:
clean
- `cargo test --manifest-path desktop/Cargo.toml`: 6 passed
- `npm run lint`, `npm run format:check`, `npm run typecheck` in `gui/`:
clean

# Additional notes

This PR and #780 both add the `## [Unreleased]` header to CHANGELOG.md,
so the second one to merge needs a rebase.

---
<sub>💬 Questions or want to chat with other contributors? Join the
[spotatui Discord](https://spotatui.com/discord).</sub>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Changed**
* When automatic updates are disabled, the desktop app skips update
checks at launch and on its regular schedule. You can still check for,
download, and install updates manually from Settings.
* Re-enabling automatic updates triggers an immediate update check. A
manual check also counts as the latest check for scheduling purposes.
* **Documentation**
* Clarified when automatic update checks are skipped and how to manage
updates manually in Settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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