Skip to content

Commit

Permalink
feat: only do steam data processing for 3 most recent games
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gleich <[email protected]>
  • Loading branch information
gleich committed Jul 27, 2024
1 parent 0cd981a commit 2bc80cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/steam/games.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func FetchRecentlyPlayedGames() []Game {
sort.Slice(ownedGames.Response.Games, func(i, j int) bool {
return ownedGames.Response.Games[i].RTimeLastPlayed > ownedGames.Response.Games[j].RTimeLastPlayed
})
ownedGames.Response.Games = ownedGames.Response.Games[:20]
ownedGames.Response.Games = ownedGames.Response.Games[:3]

var games []Game
for _, g := range ownedGames.Response.Games {
Expand Down Expand Up @@ -106,5 +106,5 @@ func FetchRecentlyPlayedGames() []Game {
})
}

return games[:3]
return games
}

0 comments on commit 2bc80cb

Please sign in to comment.