diff --git a/frames/playersearch.py b/frames/playersearch.py index e9bdd39..491f07e 100644 --- a/frames/playersearch.py +++ b/frames/playersearch.py @@ -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()