mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2026-07-12 05:54:35 +10:00
feat(library): implement playtime tracking on the frontend
This commit is contained in:
@@ -51,13 +51,14 @@ pub struct PlaytimeStats {
|
||||
|
||||
impl From<GamePlaytimeStats> for PlaytimeStats {
|
||||
fn from(stats: GamePlaytimeStats) -> Self {
|
||||
let average_length = stats.average_session_length();
|
||||
Self {
|
||||
game_id: stats.game_id,
|
||||
total_playtime_seconds: stats.total_playtime_seconds,
|
||||
session_count: stats.session_count,
|
||||
first_played: stats.first_played,
|
||||
last_played: stats.last_played,
|
||||
average_session_length: stats.average_session_length(),
|
||||
average_session_length: average_length,
|
||||
current_session_duration: None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user