Skip to content

Commit

Permalink
card_count update
Browse files Browse the repository at this point in the history
- Small update to card_count logic
  • Loading branch information
Investigamer committed Jun 15, 2022
1 parent b5e5710 commit e9130b3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions proxyshop/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ def __init__(self, scryfall, card_name):
if 'card_count' in self.scryfall:
self.card_count = self.scryfall['card_count']
else: self.card_count = ""

# Ensure minimum 3 digit number length
if len(str(self.card_count)) == 2:
self.card_count = "0" + str(self.card_count)
elif len(str(self.card_count)) == 1:
self.card_count = "00" + str(self.card_count)
elif len(str(self.card_count)) == 0:
self.card_count = None
else: self.card_count = scryfall['printed_size']

# Ensure card_count minimum 3 digit number length
if len(str(self.card_count)) == 2:
self.card_count = "0" + str(self.card_count)
elif len(str(self.card_count)) == 1:
self.card_count = "00" + str(self.card_count)
elif len(str(self.card_count)) == 0:
self.card_count = None

# Automatic set symbol enabled?
if cfg.auto_symbol and self.set in con.set_symbols:
self.symbol = con.set_symbols[self.set]
Expand Down

0 comments on commit e9130b3

Please sign in to comment.