Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frames/playersearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ def lookup(self, event=None):
self.kill_job()
payload = {'jsonParamObject': json.dumps({'name': self._playerName})}
response = requests.get(self.url, params=payload).json()
# Little fix for new special cards e.g halloween cards, now shows an TOTW-Card instead
# (seems like a problem with the Api not getting the newer colors?)
j = response['count']
k = 0
while k < j:
if response['items'][k]['color'] == "halloween" or response['items'][k]['color'] == "":
response['items'][k]['color'] = "totw_gold"
k += 1
self.controller.status.set_status('Found %d matches for "%s"' % (response['totalResults'], self._playerName))
for child in self.interior.winfo_children():
child.destroy()
Expand Down