status: spotify_error, the last Spotify session error and when it happened

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 19:59:40 +10:00
parent 2e136ddb8c
commit 66e72cebcc
4 changed files with 19 additions and 1 deletions
+4
View File
@@ -390,6 +390,10 @@ static void player_status(cJSON *st)
cJSON_AddStringToObject(st, "active_source", SRC_NAME[src]);
cJSON_AddStringToObject(st, "source_state", state);
cJSON_AddStringToObject(st, "spotify_state", spotify_state());
char err[96];
if (spotify_last_error(err, sizeof(err))) {
cJSON_AddStringToObject(st, "spotify_error", err);
}
cJSON_AddNumberToObject(st, "buffer_ms", (double)(audio_ring_level() * 1000 / RATE));
}