record raw events everywhere
record-daemon / Build, check and test (push) Waiting to run

This commit is contained in:
vhaudiquet committed 2026-05-06 23:53:01 +02:00
1 parent ff713da1e8
commit fcfa55d0aa
13 files changed
+848 -2043

No files matched your search

+9 -11
View File
@@ -9,32 +9,30 @@ use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::error::{Result, TimelineError};
use crate::lqp::GameEvent;
use crate::recording::RecordingResult;
/// A timestamped event in the timeline.
/// Stores raw API data only — no typed event parsing.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TimestampedEvent {
/// Video timestamp (offset from recording start).
// #[serde(with = "chrono::serde::seconds")]
pub video_timestamp: Duration,
/// Game timestamp (in-game time).
// #[serde(with = "chrono::serde::seconds_option")]
pub game_timestamp: Option<Duration>,
/// Real-world timestamp.
pub timestamp: DateTime<Utc>,
/// Event type name (derived from URI).
/// Event type string derived from URI (e.g. "game_start", "lp_change", "kill").
pub event_type: String,
/// Human-readable description.
pub description: String,
/// The actual event data.
pub event: GameEvent,
/// Raw JSON data from the API (for flexibility).
/// Human-readable description for logging.
#[serde(default)]
pub raw_data: Option<serde_json::Value>,
pub description: String,
/// The raw JSON data from the API — the single source of truth.
/// The tauri-app parses the values it needs from this data.
#[serde(default)]
pub raw_data: serde_json::Value,
/// URI of the endpoint that triggered this event.
#[serde(default)]
pub uri: Option<String>,
pub uri: String,
}
/// Metadata for a recording.