Add Steam integration showing online status and recent games
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
Fetches player summary and recently played games from Steam API with 5-minute server-side caching. Displays in the home sidebar with online indicator and game artwork. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,12 @@ type Store struct {
|
||||
GiteaPort string
|
||||
GiteaFeed *services.GiteaFeedResponse
|
||||
GiteaFeedFetchedAt time.Time
|
||||
|
||||
SteamAPIKey string
|
||||
SteamID string
|
||||
SteamRecentGames []services.SteamRecentGame
|
||||
SteamOnline bool
|
||||
SteamFetchedAt time.Time
|
||||
}
|
||||
|
||||
func (s *Store) GiteaFeedFresh() bool {
|
||||
@@ -33,3 +39,10 @@ func (s *Store) GiteaFeedFresh() bool {
|
||||
}
|
||||
return time.Since(s.GiteaFeedFetchedAt) < time.Minute
|
||||
}
|
||||
|
||||
func (s *Store) SteamFresh() bool {
|
||||
if s.SteamRecentGames == nil {
|
||||
return false
|
||||
}
|
||||
return time.Since(s.SteamFetchedAt) < 5*time.Minute
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user