Skip to content

Commit

Permalink
cardtrader/sealed: Rename sub sellers to avoid clashing
Browse files Browse the repository at this point in the history
Market decoupling was conflicting with the main CT scraper.
  • Loading branch information
kodawah committed Oct 6, 2023
1 parent f38125b commit ccc1a16
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cardtrader/sealed.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ func (ct *CardtraderSealed) scrape() error {
}

// Assign a seller name as required by Market
result.invEntry.SellerName = "Card Trader"
result.invEntry.SellerName = "Card Trader Sealed"
if result.invEntry.Bundle {
result.invEntry.SellerName = "Card Trader Zero"
result.invEntry.SellerName = "Card Trader Zero Sealed"
}
var err error
err = ct.inventory.Add(result.cardId, result.invEntry)
Expand Down Expand Up @@ -293,12 +293,16 @@ func (ct *CardtraderSealed) InitializeInventory(reader io.Reader) error {
return nil
}

var availableMarketNamesSealed = []string{
"Card Trader Sealed", "Card Trader Zero Sealed",
}

func (tcg *CardtraderSealed) MarketNames() []string {
return availableMarketNames
return availableMarketNamesSealed
}

func (ct *CardtraderSealed) Info() (info mtgban.ScraperInfo) {
info.Name = "Card Trader"
info.Name = "Card Trader Sealed"
info.Shorthand = "CTSealed"
info.InventoryTimestamp = &ct.inventoryDate
info.CountryFlag = "EU"
Expand Down

0 comments on commit ccc1a16

Please sign in to comment.