Fix seeding infos
parent
21cb648422
commit
c5e2e062b8
|
@ -874,10 +874,16 @@ def getTournamentTop(
|
||||||
for standing in standings :
|
for standing in standings :
|
||||||
|
|
||||||
seeding = None
|
seeding = None
|
||||||
|
seeding32 = None
|
||||||
for seed in standing["entrant"]["seeds"]:
|
for seed in standing["entrant"]["seeds"]:
|
||||||
# Take the seeding from the phase with *all* Event entrants
|
# Take the seeding from the phase with *all* Event entrants
|
||||||
if seed["phase"]["numSeeds"] == tournament.numEntrants:
|
if seed["phase"]["numSeeds"] == tournament.numEntrants:
|
||||||
seeding = seed["groupSeedNum"]
|
seeding = seed["groupSeedNum"]
|
||||||
|
if seed["phase"]["numSeeds"] == 32:
|
||||||
|
seeding32 = seed["groupSeedNum"]
|
||||||
|
if seeding is None:
|
||||||
|
log.info("no global seeding found, using top 32 seeding")
|
||||||
|
seeding = seeding32
|
||||||
|
|
||||||
participant_data = standing["entrant"]["participants"][0]
|
participant_data = standing["entrant"]["participants"][0]
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,10 @@ class Player():
|
||||||
self.prefix = ( "" if prefix is None else prefix )
|
self.prefix = ( "" if prefix is None else prefix )
|
||||||
self.gamerTag = gamerTag
|
self.gamerTag = gamerTag
|
||||||
self.placement = int(placement)
|
self.placement = int(placement)
|
||||||
self.seeding = int(seeding)
|
try:
|
||||||
|
self.seeding = int(seeding)
|
||||||
|
except:
|
||||||
|
self.seeding = 0
|
||||||
self.twitterHandle = ( "" if twitterHandle is None else twitterHandle )
|
self.twitterHandle = ( "" if twitterHandle is None else twitterHandle )
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue