MPRIS Play/Pause stops audio but spotatui keeps showing and reporting playing
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- audio-video-rtc, backend
Línea de trabajo
Read pause_playback() in src/infra/network/playback.rs, the MPRIS handlers in src/runtime/startup.rs, and PlayerEvent::Paused in src/infra/player/events.rs. Trace which state and pending playback actions each path updates, then run the relevant playback and MPRIS tests. Done when pausing through MPRIS updates the TUI and reported PlaybackStatus to Paused and does not trigger the reported recovery error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened
When I pause from outside spotatui (playerctl, Quickshell's media widget, media keys), the audio stops, but spotatui still thinks it's playing. Its own playbar shows Playing, and over MPRIS it keeps reporting PlaybackStatus as Playing, so desktop widgets show the wrong icon and a frozen position. Shortly after, the TUI shows Failed to start native playback.
Pausing with spotatui's own key works: the TUI, playerctl status and Quickshell all switch to Paused.
playerctl -p spotatui pause and playerctl -p spotatui play-pause both trigger it.
The two pause paths do different amounts of work. The TUI key goes through pause_playback() in src/infra/network/playback.rs, which pauses the player and also clears pending_start_playback and native_load_watchdog, cancels play-after-transfer, and sets native_is_playing and current_playback_context.is_playing to false. The MPRIS handlers in src/runtime/startup.rs (MprisEvent::Pause, PlayPause, Stop) only call player.pause() and set_native_playback_intent(false), so the app state still says playing.
The Failed to start native playback error may come from the play-after-transfer flag the MPRIS path doesn't cancel. The PlayerEvent::Paused handler in src/infra/player/events.rs checks take_play_after_transfer() first. If the flag is set, it calls player.play() and skips mpris.set_playback_status(false). I haven't confirmed this.
Expected: pausing over MPRIS behaves the same as pausing in the TUI. One shared App method for the pause bookkeeping, called from both paths, would cover it.
Steps to reproduce
- Start spotatui with native streaming and play a song.
- Run playerctl -p spotatui pause (or play-pause).
- The audio stops, but the TUI still shows Playing and playerctl -p spotatui status prints Playing.
- Shortly after, Failed to start native playback appears.
Frontend
Terminal app
Source
Spotify
spotatui version
0.47.0
OS
Fedora 44
How you installed spotatui
cargo install / cargo binstall
Terminal
Kitty
Debug log
The MPRIS Pause/PlayPause path writes nothing to the log, so the pause itself
doesn't appear. In-app toggles do log ("toggling playback: ..."). This is the snippet from
a run where the error appeared:
[01:17:10][spotatui::core::app::transport][INFO] toggling playback: paused
[01:17:36][spotatui::core::app::transport][INFO] toggling playback: playing
[01:17:49][spotatui::infra::network::playback][INFO] starting native playback via direct load route
[01:17:49][spotatui_librespot_connect::spirc][WARN] SpircCommand::Activate will be ignored while already active
[01:17:54][spotatui::core::app::tick][WARN] no player event within 5s of native load; forcing recovery attempt 1
[01:17:54][spotatui::infra::player::events][INFO] attempting native streaming recovery
[01:17:54][spotatui::infra::player::events][INFO] recovery route: replay parked StartPlayback
[01:17:55][spotatui::infra::network::playback][INFO] recovery replay: starting native playback via Spotify context route on device <device>
[01:17:58][spotatui_librespot_connect::spirc][ERROR] failed to handle request: Invalid state { context is not available. type: Default }
[01:17:58][spotatui::infra::network::requests][WARN] Spotify API PUT /v1/me/player/play?device_id=<device> failed in 3043ms: Spotify API 404 Not Found failed: Requested entity was not found
[01:17:58][spotatui::core::app::status][INFO] error occurred: Failed to start native playback: Spotify API 404 Not Found ... { Response status code: 410 Gone }
- Lenguaje dominante
- Rust
- Estrellas
- 1.4k
- Forks
- 238
- Merge medio
- 10 h 1 min
- PR fusionados (30 d)
- 171
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de LargeModGames/spotatui
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
LargeModGames/spotatui#977 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
LargeModGames/spotatui#872 · 18 comentarios ·
Los mantenedores suelen responder en 1 día
-
Text Emphasis off still bolds the selected row in every list and tablePosiblemente ocupada @jaopdc11 la tomó hace 15 días. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
LargeModGames/spotatui#822 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug/qol : implicit error messageAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 57/100
LargeModGames/spotatui#984 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Audio cache limitPosiblemente ocupada @niukanen1 la tomó hace 5 días. Abiertoenhancement
Dificultad 4/5 1-2 días Aptitud para principiantes 48/100
LargeModGames/spotatui#957 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de LargeModGames/spotatui
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
rubys/roundhouse#1917 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
[cosmic-applet-battery] Division by zero displays NaN% when UPower reports max_brightness = 0Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
pop-os/cosmic-applets#1619 ·
Los mantenedores suelen responder en 3 días
-
binding:python bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día