bartervg / barter.vg

Track and hold discussion on Barter.vg bugs, enhancements, and other issues
https://barter.vg
MIT License
20 stars 4 forks source link

Steam trading card counts #207

Closed bartervg closed 3 years ago

bartervg commented 3 years ago

Describe the bug

The Steam trading card count is off by one.

Steps to reproduce the bug

  1. Go to https://barter.vg/i/91750/
  2. View 16 Trading Cards
  3. Verify that the correct count is 15 on Steam and SteamCardExchange

Expected behavior

Trading card count should be the same count as Steam and not one more.

Screenshots (if helpful)

image image

Additional context

This is a persistent problem first reported by @Luckz in early October. Had hoped that it was an isolated problem, but it looks like it affects all new count counts.

bartervg commented 3 years ago

This looks to be fixed for new card info, e.g. Skul: The Hero Slayer has 15 cards. However, existing card data isn't rechecked and therefore not fixed. https://barter.vg/i/91750/ remains at 16 cards.

bartervg commented 3 years ago

Steamtools has an off-by-one error for card sets added after a certain date (sometime in October). To mitigate this, I added various sanity checks, adjustments ($cards -= 1;), and error reporting to #notices. I checked previously reported card sets, and the counts seem to be accurate now.

To prevent this from happening again, need to stop syncing as soon as an error is detected. Assuming card counts don't change, errors will come from new set counts, or old sets that weren't fixed in the adjustments today.