Example: build a read-only live lyrics companion

オープン
#86 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api

調査の方向性

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 の本文から書いたものです。

説明

documentation enhancement help wanted

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:

  1. connect using the user's SPOTIFY_COOKIE;
  2. observe an existing Spotify player without starting playback;
  3. fetch lyrics when the current track changes;
  4. select active lines using PlaybackState.position_ms and Lyrics.at();
  5. print track information, the current lyric, and the supplied artwork URL when available.

Acceptance criteria

  • Add a focused examples/live_lyrics.py script 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分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Aran404/SpotAPI のほかの issue

Aran404/SpotAPI の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。