No description provided.
feat: sync games from Steam #396
Merged
robida
merged 8 commits from 2026年03月06日 18:53:19 +01:00
steam-tracking into main
robida
commented 2026年03月06日 17:01:51 +01:00
robida
added 1 commit 2026年03月06日 17:01:52 +01:00
robida
added 5 commits 2026年03月06日 17:30:55 +01:00
- Format play-time-minutes as human-readable duration via JS (e.g. '226' → '3 hours, 46 minutes') - Move game icon into play-of h-cite instead of entry photo (icons are too small for standalone photos) - Remove CSS ::after 'm' suffix (JS handles formatting now)
When a game entry was deleted and the worker ran again, it found no active entry (deleted_at_hlc IS NULL) but create_entry would generate the same slug-based UID, hitting IntegrityError which was silently swallowed. Now the lookup includes soft-deleted entries. If found deleted, the entry is restored by clearing deleted_at_hlc and updating playtime/published.
Instead of one entry per game that gets updated, each sync run creates new play-N entries (like listen posts) for games played since the last run. This gives a timeline of gaming sessions. Changes: - Worker tracks last run time in new worker_state table - First run records baseline without creating entries - Subsequent runs create entries for games with rtime_last_played > last_run - Sequential play-N slugs via _determine_slug in storage.py - Removed update/restore logic (no longer needed) - Schema: added worker_state table (key TEXT PRIMARY KEY, value TEXT)
🐧 linux, 🍎 mac, 🪟 windows, 🎮 steam-deck
formatPlaytime/formatPlatforms were only called from processNewEntries (client-side rendering). Now also called on module load for server-rendered HTML.
robida
added 2 commits 2026年03月06日 18:44:03 +01:00
Without this, create_entry wouldn't retry on slug collisions for play-N entries (race condition handling).
initEntries didn't call processNewEntries() when server-rendered entries existed (currentOffset > 0). On SPA navigation, the router replaces DOM content with fresh server HTML but formatPlaytime/ formatPlatforms never ran on those elements. Also: reformat SQL to leading comma style in tools_test.py, sync_steam_test.py, and sync_steam.py.
robida
merged commit 7cdd7b7c07 into main 2026年03月06日 18:53:19 +01:00
robida
deleted branch steam-tracking 2026年03月06日 18:53:20 +01:00
robida
referenced this pull request from a commit 2026年03月06日 18:53:20 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
robida/site!396
Loading...
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "steam-tracking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?