From c202f2eca32e1ab2e313417168351df1c58ee062 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 4 Aug 2021 23:53:36 -0400 Subject: More major changes. Web UI works. Downloading games works. Status works. extractFile needs work --- steam/game.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'steam/game.go') diff --git a/steam/game.go b/steam/game.go index 0028257..dd4a297 100644 --- a/steam/game.go +++ b/steam/game.go @@ -5,6 +5,15 @@ import ( "path/filepath" ) +// GetSizeBytes returns the size in bytes, calling SetSizeInfo info Size is +// currently == 0 +func (g *Game) GetSizeBytes() int64 { + if g.Size == 0 { + _ = g.SetSizeInfo() + } + return g.Size +} + // GetSize returns the size of a game in a pretty format. If size is 0 // it will call SetSizeInfo before returning func (g *Game) GetSize() string { -- cgit v1.2.3