1
1
Fork
You've already forked site
0

feat: sync games from Steam #396

Merged
robida merged 8 commits from steam-tracking into main 2026年03月06日 18:53:19 +01:00
No description provided.
feat: sync games from Steam
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ea79c71bde
- 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
fix: format playtime and platforms on server-rendered pages
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
926b4f7a29
formatPlaytime/formatPlatforms were only called from processNewEntries
(client-side rendering). Now also called on module load for
server-rendered HTML.
Without this, create_entry wouldn't retry on slug collisions
for play-N entries (race condition handling).
fix: process server-rendered entries on SPA navigation
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
43c50eb3ac
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 deleted branch steam-tracking 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
Reference in a new issue
robida/site
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?