Example: build a read-only live lyrics companion
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 493
- 派生
- 40
- 平均合并
- 5 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Aran404/SpotAPI 的其他 Issue
-
CLI: expose public search language with --language可能已有人在做 @semajzandrews 今天认领。 未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 62/100
-
CLI: reject invalid player seek and volume values before connecting可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 75/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
deepchem/deepchem#5289 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 60/100
UKGovernmentBEIS/inspect_evals#2892 · 1 条评论 ·
维护者通常 1 天内回复
-
Versioning docs: say that no output from the 0.46 warning check means nothing is affected可能已有人在做 @grelinfo 今天认领。 未关闭documentation priority:low size:S
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
alphacrack/readme2demo#293 ·