Skip importing digital-only sets
This commit is contained in:
parent
75b425c849
commit
d74d299418
|
@ -39,6 +39,12 @@ func InsertOrUpdateSets(db *sql.DB, sets []types.Set) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, set := range sets {
|
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)
|
_, err = insertOrUpdate.Exec(set.Code, set.Name, set.CardCount, set.IconSvgUri, set.Name, set.CardCount, set.IconSvgUri)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -11,4 +11,5 @@ type Set struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
CardCount int `json:"card_count"`
|
CardCount int `json:"card_count"`
|
||||||
IconSvgUri string `json:"icon_svg_uri"`
|
IconSvgUri string `json:"icon_svg_uri"`
|
||||||
|
Digital bool `json:"digital"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue