Refactor Eprice
kihashi opened this issue · comments
- Use the database.
- Update the DB no more than once per day.
I don't think that you can link the mtgoprice table to CardRelease
or Expansion
because he abbreviations are not guaranteed to be standard as well as there being online only sets.
So the db table will look like:
card = Card(ManyToOne)
expansion = String
price = float
I am not going to implement foil pricing at this time.
I have added a parser for it. Each CardRelease has an associated MTGOPrice object. I was able to do this by adding edition searching by old code and gatherer code. The price list seems to use a mixture of both, so now edition searching searches code, then gatherer code, then old code.
I still need to figure out how to deal with promo cards and sets like vintage masters and theme decks.
Forgot to mention, it also does not deal with split cards at the moment.
I added the bot command for it. Also fixed a problem where the prices were not being committed to the DB.
I added a 4th MTGO Code for sets, so now you can search by that too. These had to be added manually in the build process from a dictionary file for the few sets that had odd codes.