fix: several small fixes
This commit is contained in:
@@ -22,7 +22,14 @@ use super::{MediaSessionType, SleepTimerMode};
|
||||
///
|
||||
/// TRACES: UR-005, UR-019, UR-023, UR-026 | DR-001, DR-028, DR-047
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, specta::Type, tauri_specta::Event)]
|
||||
#[serde(tag = "type", rename_all = "snake_case", rename_all_fields = "camelCase")]
|
||||
// NOTE: fields are intentionally snake_case on the wire. specta generates the
|
||||
// TypeScript bindings with snake_case field names (it does not apply serde's
|
||||
// `rename_all_fields`), so adding `rename_all_fields = "camelCase"` here makes
|
||||
// serde emit camelCase payloads that no longer match the generated schema —
|
||||
// tauri-specta then silently drops those events (e.g. state_changed,
|
||||
// queue_changed never reach the frontend, so the mini player never appears).
|
||||
// Keep serde and specta agreeing: snake_case fields, snake_case variant tags.
|
||||
#[serde(tag = "type", rename_all = "snake_case")]
|
||||
pub enum PlayerStatusEvent {
|
||||
/// Playback position updated (emitted periodically during playback)
|
||||
PositionUpdate {
|
||||
|
||||
Reference in New Issue
Block a user