switch: Added platform name as constant
This commit is contained in:
parent
f5991dfd21
commit
ffa6db5c28
|
@ -14,6 +14,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const providerName = "nintendo-switch"
|
const providerName = "nintendo-switch"
|
||||||
|
const platformName = "Nintendo Switch"
|
||||||
const gameListURL = "https://fmartingr.github.io/switch-games-json/switch_id_names.json"
|
const gameListURL = "https://fmartingr.github.io/switch-games-json/switch_id_names.json"
|
||||||
|
|
||||||
type SwitchGame struct {
|
type SwitchGame struct {
|
||||||
|
@ -68,7 +69,7 @@ func addScreenshotToGame(userGames []games.Game, switchGame SwitchGame, screensh
|
||||||
}
|
}
|
||||||
|
|
||||||
if foundGame.ID == "" {
|
if foundGame.ID == "" {
|
||||||
foundGame := games.Game{Name: switchGame.Name, ID: switchGame.EncryptedGameID, Platform: "Nintendo Switch", Provider: providerName}
|
foundGame := games.Game{Name: switchGame.Name, ID: switchGame.EncryptedGameID, Platform: platformName, Provider: providerName}
|
||||||
foundGame.Screenshots = append(foundGame.Screenshots, screenshot)
|
foundGame.Screenshots = append(foundGame.Screenshots, screenshot)
|
||||||
userGames = append(userGames, foundGame)
|
userGames = append(userGames, foundGame)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue