Skip to content

Commit

Permalink
Logos don't have dimension
Browse files Browse the repository at this point in the history
Fix #87
  • Loading branch information
Lucki authored and boppreh committed Mar 27, 2021
1 parent 9c8788d commit 5370c2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion download.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,23 @@ func getSteamGridDBImage(game *Game, artStyleExtensions []string, steamGridDBApi
// Try for HQ, then for LQ
// It's possible to request both dimensions in one go but that'll give us scrambled results with no indicator which result has which size.
for i := 0; i < 3; i += 2 {
filter := steamGridFilter + "&dimensions=" + artStyleExtensions[3+i] + "x" + artStyleExtensions[4+i]

filter := ""
// Try with game.ID which is probably steams appID
var baseURL string
switch artStyleExtensions[1] {
case ".banner":
baseURL = steamGridDBBaseURL + "/grids"
filter = steamGridFilter + "&dimensions=" + artStyleExtensions[3+i] + "x" + artStyleExtensions[4+i]
case ".cover":
baseURL = steamGridDBBaseURL + "/grids"
filter = steamGridFilter + "&dimensions=" + artStyleExtensions[3+i] + "x" + artStyleExtensions[4+i]
case ".hero":
baseURL = steamGridDBBaseURL + "/heroes"
filter = steamGridFilter + "&dimensions=" + artStyleExtensions[3+i] + "x" + artStyleExtensions[4+i]
case ".logo":
baseURL = steamGridDBBaseURL + "/logos"
filter = steamGridFilter
}
url := baseURL + "/steam/" + game.ID + filter

Expand Down

0 comments on commit 5370c2d

Please sign in to comment.