Example: build a read-only live lyrics companion

Abierto
#86 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
493
Forks
40
Merge medio
5 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Aran404/SpotAPI

Todos los issues de Aran404/SpotAPI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.