Skip importing digital-only sets

This commit is contained in:
The Magician 2024-05-20 17:20:27 +01:00
parent 75b425c849
commit d74d299418
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,12 @@ func InsertOrUpdateSets(db *sql.DB, sets []types.Set) error {
}
for _, set := range sets {
// We're only interested in paper cards, so skip importing
// any sets that were only released in a video game
if set.Digital {
continue
}
_, err = insertOrUpdate.Exec(set.Code, set.Name, set.CardCount, set.IconSvgUri, set.Name, set.CardCount, set.IconSvgUri)
if err != nil {
return err

View File

@ -11,4 +11,5 @@ type Set struct {
Name string `json:"name"`
CardCount int `json:"card_count"`
IconSvgUri string `json:"icon_svg_uri"`
Digital bool `json:"digital"`
}