Skip to content

feat(lyrics-plus): optimize musixmatch API calls - #3909

Merged
rxri merged 1 commit into
spicetify:mainfrom
ianz56:fix-musixmatch-api
Aug 25, 2026
Merged

feat(lyrics-plus): optimize musixmatch API calls#3909
rxri merged 1 commit into
spicetify:mainfrom
ianz56:fix-musixmatch-api

Conversation

@ianz56

@ianz56 ianz56 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Optimizes the Musixmatch API calls in the lyrics-plus custom app by preventing redundant network requests when syncing karaoke lyrics. Previously, findLyrics would call macro.subtitles.get, and if karaoke syncing was needed, getKaraoke would make a separate follow-up call to track.richsync.get.

By appending track.richsync as an optional call to the initial macro.subtitles.get parameter, getKaraoke can now extract the richsync payload directly from the combined response body. This eliminates the need for a separate Spicetify.CosmosAsync.get request, effectively cutting network calls in half to improve load times and reduce traffic.

Summary by CodeRabbit

  • New Features

    • Improved lyric timing retrieval for more compact karaoke synchronization data.
  • Bug Fixes

    • Karaoke parsing now handles unavailable or unsuccessful synchronization responses gracefully.
    • Eliminated an unnecessary follow-up request when synchronization data is already available.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b6036251-34f5-4e9e-9212-379d1999f42b

📥 Commits

Reviewing files that changed from the base of the PR and between c9571cd and 2fba321.

📒 Files selected for processing (1)
  • CustomApps/lyrics-plus/ProviderMusixmatch.js

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Musixmatch lyric requests now include compact rich-sync data. getKaraoke reads that data from the initial macro response and returns null when it is unavailable or unsuccessful.

Changes

Musixmatch rich-sync integration

Layer / File(s) Summary
Include rich-sync data in lyric requests
CustomApps/lyrics-plus/ProviderMusixmatch.js
The lyric request adds the track.richsync optional macro call and requests compact word timing data.
Parse rich-sync data from the macro response
CustomApps/lyrics-plus/ProviderMusixmatch.js
getKaraoke uses track.richsync.get from the existing macro response. It returns null when the response is missing, unsuccessful, or lacks rich-sync data.

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

Merge Risk: ⚪ Minimal · up to 2fba3

This localized change reduces redundant Musixmatch requests without any supplied merge-blocking correctness or operational risk; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: optimizing Musixmatch API calls in the lyrics-plus custom app.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@rxri rxri changed the title chore(lyrics-plus): optimize musixmatch API calls feat(lyrics-plus): optimize musixmatch API calls Aug 25, 2026
@rxri
rxri merged commit 2d9c944 into spicetify:main Aug 25, 2026
7 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

Development

Successfully merging this pull request may close these issues.

2 participants