diff --git a/pkg/providers/nintendo_switch/helpers.go b/pkg/providers/nintendo_switch/helpers.go index 0e52c3c..8de60e4 100644 --- a/pkg/providers/nintendo_switch/helpers.go +++ b/pkg/providers/nintendo_switch/helpers.go @@ -61,7 +61,7 @@ func addScreenshotToGame(userGames []*models.Game, switchGame SwitchGame, screen } } - if foundGame.ID == "" { + if foundGame == nil { foundGame := models.Game{Name: switchGame.Name, ID: switchGame.EncryptedGameID, Platform: platformName, Provider: platformName} foundGame.Screenshots = append(foundGame.Screenshots, screenshot) userGames = append(userGames, &foundGame) diff --git a/pkg/providers/playstation4/helpers.go b/pkg/providers/playstation4/helpers.go index 0514b64..d3d5393 100644 --- a/pkg/providers/playstation4/helpers.go +++ b/pkg/providers/playstation4/helpers.go @@ -11,7 +11,7 @@ func addScreenshotToGame(userGames []*models.Game, gameName string, screenshot m } } - if foundGame.ID == "" { + if foundGame == nil { foundGame := models.Game{Name: gameName, ID: gameName, Platform: platformName, Provider: platformName} foundGame.Screenshots = append(foundGame.Screenshots, screenshot) userGames = append(userGames, &foundGame)