Example: build a read-only live lyrics companion
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Create the new script at examples/live_lyrics.py, using examples/player.py and examples/lyrics.py as the reference for resource ownership and cancellation. Read how PlaybackState.position_ms and Lyrics.at() are exposed in the typed player and lyrics APIs before selecting the active line. Done means the script runs offline checks, handles missing or unsynchronized lyrics, discards stale lyric fetches on track change, exits cleanly on Ctrl+C, and is linked from the player docs.
Written by the indexing model from the issue text.
Description
Goal
Add one polished example that combines SpotAPI's existing typed player and lyrics APIs into a live, synchronized terminal companion. This demonstrates a complete workflow without expanding the core library.
Expected workflow
The example should:
- connect using the user's
SPOTIFY_COOKIE; - observe an existing Spotify player without starting playback;
- fetch lyrics when the current track changes;
- select active lines using
PlaybackState.position_msandLyrics.at(); - print track information, the current lyric, and the supplied artwork URL when available.
Acceptance criteria
- Add a focused
examples/live_lyrics.pyscript with no new runtime dependency. - Do not send playback commands, download audio, or write account data.
- Handle tracks without lyrics and unsynchronized lyrics clearly.
- Cancel or discard stale lyric work when the track changes.
- Exit cleanly on Ctrl+C and close owned resources.
- Link the example from the player documentation.
- Keep credentials out of output and error messages.
- Run the existing offline quality checks; a maintainer will perform final live verification.
Notes
This uses authenticated, entitlement-dependent Spotify behavior and therefore requires more care than the two beginner CLI issues. Preserve the ownership and cancellation patterns used in examples/player.py and examples/lyrics.py.
Comment before starting so duplicate work can be avoided.
- Dominant language
- Python
- Stars
- 493
- Forks
- 40
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Aran404/SpotAPI
-
CLI: expose public search language with --languagePossibly taken @semajzandrews claimed this today. Openenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
CLI: reject invalid player seek and volume values before connectingMay be free again A pull request for this issue was closed without being merged. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
deepchem/deepchem#5289 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
UKGovernmentBEIS/inspect_evals#2892 · 1 comment ·
Maintainers usually reply within 1 day
-
Versioning docs: say that no output from the 0.46 warning check means nothing is affectedPossibly taken @grelinfo claimed this today. Opendocumentation priority:low size:S
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
alphacrack/readme2demo#293 ·