Example: build a read-only live lyrics companion

Đang mở
#86 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
493
Fork
40
Merge trung bình
5 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Aran404/SpotAPI

Tất cả issue của Aran404/SpotAPI

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.