diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2021-08-04 23:53:36 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2021-08-04 23:53:36 -0400 |
| commit | c202f2eca32e1ab2e313417168351df1c58ee062 (patch) | |
| tree | 6540629b337d2d769581baec26096ac0555f71f9 /steam/game.go | |
| parent | 742938b00222c7ad57ad11eb24850d9202c2503d (diff) | |
| download | steam-export-c202f2eca32e1ab2e313417168351df1c58ee062.tar.gz steam-export-c202f2eca32e1ab2e313417168351df1c58ee062.tar.xz | |
More major changes. Web UI works. Downloading games works. Status works. extractFile needs work
Diffstat (limited to 'steam/game.go')
| -rw-r--r-- | steam/game.go | 9 |
1 files changed, 9 insertions, 0 deletions
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 { |
