Skip to content

feat(apple-music-lyrics): add Apple Music desktop lyrics plugin - #533

Open
AndrewDi wants to merge 1 commit into
mactools-app:mainfrom
AndrewDi:apple-music-lyrics-plugin
Open

AndrewDi wants to merge 1 commit into
mactools-app:mainfrom
AndrewDi:apple-music-lyrics-plugin

Conversation

@AndrewDi

@AndrewDi AndrewDi commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a new Plugins/AppleMusicLyrics/ plugin that shows frosted-glass desktop lyrics in the top-right corner while Apple Music plays. The plugin reads lyric documents already cached by Music.app locally, so it needs no Apple account, network request, or extra permission.

The floating window is a borderless NSPanel with an NSVisualEffectView (.hudWindow material) that stays on top without activating. Track and playback position are polled every 0.5 s from Music.app, and lyrics are matched by title, artist, album, and duration against the cached catalog responses.

Features

  • Configurable appearance: font size, background opacity, text opacity (independent), corner radius, text color, and next-line visibility.
  • Karaoke rendering: per-word sung/upcoming highlighting with a fallback whole-line gradient when per-word timings are absent. A 逐字渲染 / Karaoke rendering toggle lets users opt out; the description notes Apple Music's timing is approximate.
  • Draggable window: an opt-in drag toggle that persists the window position across launches.
  • Localization: 12 languages (zh-Hans, zh-Hant, en, ar, de, es, fr, ja, ko, pt, ru, tr).
  • Tests: 23 focused unit tests covering TTML parsing, cache lyric matching, karaoke rendering, text-color opacity scaling, and settings persistence/reset.

Documentation

  • docs/plugins/apple-music-lyrics.md: plugin guide with settings and manual verification steps.
  • README.md / README.zh-CN.md: feature paragraph in both languages.
  • changes/unreleased/apple-music-lyrics-plugin.md: changelog fragment.
  • docs/plugins/preferences-backup-inventory.md and site/src/generated/plugins.json: regenerated metadata.

Validation

  • ✅ make validate-changelog and make validate-localization pass.
  • ✅ 23 focused unit tests pass.
  • ✅ Adhoc-signed build succeeds; plugin dynamically loads in the host app.
  • ✅ Manual verification: window appears at top-right, karaoke sung/upcoming contrast is visible and can be toggled off, drag position persists across relaunch.

Notes

  • docs/plugins/catalog.json is intentionally left untouched (it is a signed release catalog regenerated by the release flow).

Add a new plugin that shows frosted-glass desktop lyrics in the
top-right corner while Apple Music plays. It reads lyrics already
cached by Music.app, so it needs no Apple account or network request.

Features:
- Configurable font size, background/text opacity, corner radius,
  text color, and next-line visibility
- Karaoke-style per-word highlighting with an opt-out toggle
- Draggable window position persisted across launches
- 12-language localization and focused unit tests

Includes a plugin guide, changelog fragment, README updates in both
languages, and regenerated plugin site data.

This branch has not been deployed

No deployments
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