mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
fix
This commit is contained in:
parent
314e7c6acd
commit
7323981c52
1 changed files with 32 additions and 28 deletions
60
db.py
60
db.py
|
@ -137,37 +137,41 @@ class RocketLeague(Base):
|
||||||
current_season = str(current_season)
|
current_season = str(current_season)
|
||||||
# Get ranked data
|
# Get ranked data
|
||||||
# Single 1v1
|
# Single 1v1
|
||||||
self.single_mmr = j["rankedSeasons"][current_season]["10"]["rankPoints"]
|
if "10" in j["rankedSeasons"][current_season]:
|
||||||
if j["rankedSeasons"][current_season]["10"]["matchesPlayed"] >= 10:
|
self.single_mmr = j["rankedSeasons"][current_season]["10"]["rankPoints"]
|
||||||
self.single_rank = j["rankedSeasons"][current_season]["10"]["tier"]
|
if j["rankedSeasons"][current_season]["10"]["matchesPlayed"] >= 10:
|
||||||
self.single_div = j["rankedSeasons"][current_season]["10"]["division"]
|
self.single_rank = j["rankedSeasons"][current_season]["10"]["tier"]
|
||||||
else:
|
self.single_div = j["rankedSeasons"][current_season]["10"]["division"]
|
||||||
self.single_rank = None
|
else:
|
||||||
self.single_div = None
|
self.single_rank = None
|
||||||
|
self.single_div = None
|
||||||
# Doubles 2v2
|
# Doubles 2v2
|
||||||
self.doubles_mmr = j["rankedSeasons"][current_season]["11"]["rankPoints"]
|
if "11" in j["rankedSeasons"][current_season]:
|
||||||
if j["rankedSeasons"][current_season]["11"]["matchesPlayed"] >= 10:
|
self.doubles_mmr = j["rankedSeasons"][current_season]["11"]["rankPoints"]
|
||||||
self.doubles_rank = j["rankedSeasons"][current_season]["11"]["tier"]
|
if j["rankedSeasons"][current_season]["11"]["matchesPlayed"] >= 10:
|
||||||
self.doubles_div = j["rankedSeasons"][current_season]["11"]["division"]
|
self.doubles_rank = j["rankedSeasons"][current_season]["11"]["tier"]
|
||||||
else:
|
self.doubles_div = j["rankedSeasons"][current_season]["11"]["division"]
|
||||||
self.doubles_rank = None
|
else:
|
||||||
self.doubles_div = None
|
self.doubles_rank = None
|
||||||
|
self.doubles_div = None
|
||||||
# Standard 3v3
|
# Standard 3v3
|
||||||
self.standard_mmr = j["rankedSeasons"][current_season]["13"]["rankPoints"]
|
if "13" in j["rankedSeasons"][current_season]:
|
||||||
if j["rankedSeasons"][current_season]["13"]["matchesPlayed"] >= 10:
|
self.standard_mmr = j["rankedSeasons"][current_season]["13"]["rankPoints"]
|
||||||
self.standard_rank = j["rankedSeasons"][current_season]["13"]["tier"]
|
if j["rankedSeasons"][current_season]["13"]["matchesPlayed"] >= 10:
|
||||||
self.standard_div = j["rankedSeasons"][current_season]["13"]["division"]
|
self.standard_rank = j["rankedSeasons"][current_season]["13"]["tier"]
|
||||||
else:
|
self.standard_div = j["rankedSeasons"][current_season]["13"]["division"]
|
||||||
self.standard_rank = None
|
else:
|
||||||
self.standard_div = None
|
self.standard_rank = None
|
||||||
|
self.standard_div = None
|
||||||
# Solo Standard 3v3
|
# Solo Standard 3v3
|
||||||
self.solo_std_mmr = j["rankedSeasons"][current_season]["12"]["rankPoints"]
|
if "12" in j["rankedSeasons"][current_season]:
|
||||||
if j["rankedSeasons"][current_season]["12"]["matchesPlayed"] >= 10:
|
self.solo_std_mmr = j["rankedSeasons"][current_season]["12"]["rankPoints"]
|
||||||
self.solo_std_rank = j["rankedSeasons"][current_season]["12"]["tier"]
|
if j["rankedSeasons"][current_season]["12"]["matchesPlayed"] >= 10:
|
||||||
self.solo_std_div = j["rankedSeasons"][current_season]["12"]["division"]
|
self.solo_std_rank = j["rankedSeasons"][current_season]["12"]["tier"]
|
||||||
else:
|
self.solo_std_div = j["rankedSeasons"][current_season]["12"]["division"]
|
||||||
self.solo_std_rank = None
|
else:
|
||||||
self.solo_std_div = None
|
self.solo_std_rank = None
|
||||||
|
self.solo_std_div = None
|
||||||
|
|
||||||
|
|
||||||
# If run as script, create all the tables in the db
|
# If run as script, create all the tables in the db
|
||||||
|
|
Loading…
Reference in a new issue