diff --git a/bemani/backend/jubeat/clan.py b/bemani/backend/jubeat/clan.py index 6362478..99c5bcb 100644 --- a/bemani/backend/jubeat/clan.py +++ b/bemani/backend/jubeat/clan.py @@ -1037,6 +1037,17 @@ class JubeatClan( data = request.child('data') player = data.child('player') extid = player.child_value('jid') + mdata_ver = player.child_value('mdata_ver') # Game requests mdata 3 times per profile for some reason + if mdata_ver != 1: + root = Node.void('gametop') + datanode = Node.void('data') + root.add_child(datanode) + player = Node.void('player') + datanode.add_child(player) + player.add_child(Node.s32('jid', extid)) + playdata = Node.void('mdata_list') + player.add_child(playdata) + return root root = self.get_scores_by_extid(extid) if root is None: root = Node.void('gametop') @@ -1092,7 +1103,6 @@ class JubeatClan( return Node.void('gameend') def format_scores(self, userid: UserID, profile: ValidatedDict, scores: List[Score]) -> Node: - scores = self.data.remote.music.get_scores(self.game, self.version, userid) root = Node.void('gametop') datanode = Node.void('data') diff --git a/bemani/backend/jubeat/prop.py b/bemani/backend/jubeat/prop.py index 571e0a5..9b869ed 100644 --- a/bemani/backend/jubeat/prop.py +++ b/bemani/backend/jubeat/prop.py @@ -533,6 +533,17 @@ class JubeatProp( data = request.child('data') player = data.child('player') extid = player.child_value('jid') + mdata_ver = player.child_value('mdata_ver') # Game requests mdata 3 times per profile for some reason + if mdata_ver != 1: + root = Node.void('gametop') + datanode = Node.void('data') + root.add_child(datanode) + player = Node.void('player') + datanode.add_child(player) + player.add_child(Node.s32('jid', extid)) + playdata = Node.void('mdata_list') + player.add_child(playdata) + return root root = self.get_scores_by_extid(extid) if root is None: root = Node.void('gametop') @@ -1329,7 +1340,6 @@ class JubeatProp( return newprofile def format_scores(self, userid: UserID, profile: ValidatedDict, scores: List[Score]) -> Node: - scores = self.data.remote.music.get_scores(self.game, self.version, userid) root = Node.void('gametop') datanode = Node.void('data') diff --git a/bemani/backend/jubeat/qubell.py b/bemani/backend/jubeat/qubell.py index f28151a..b4126c6 100644 --- a/bemani/backend/jubeat/qubell.py +++ b/bemani/backend/jubeat/qubell.py @@ -431,6 +431,17 @@ class JubeatQubell( data = request.child('data') player = data.child('player') extid = player.child_value('jid') + mdata_ver = player.child_value('mdata_ver') # Game requests mdata 3 times per profile for some reason + if mdata_ver != 1: + root = Node.void('gametop') + datanode = Node.void('data') + root.add_child(datanode) + player = Node.void('player') + datanode.add_child(player) + player.add_child(Node.s32('jid', extid)) + playdata = Node.void('mdata_list') + player.add_child(playdata) + return root root = self.get_scores_by_extid(extid) if root is None: root = Node.void('gametop') @@ -831,7 +842,6 @@ class JubeatQubell( return root def format_scores(self, userid: UserID, profile: ValidatedDict, scores: List[Score]) -> Node: - scores = self.data.remote.music.get_scores(self.game, self.version, userid) root = Node.void('gametop') datanode = Node.void('data') diff --git a/bemani/backend/jubeat/saucer.py b/bemani/backend/jubeat/saucer.py index 3f3deec..0a16f3a 100644 --- a/bemani/backend/jubeat/saucer.py +++ b/bemani/backend/jubeat/saucer.py @@ -134,6 +134,18 @@ class JubeatSaucer( data = request.child('data') player = data.child('player') extid = player.child_value('jid') + mdata_ver = player.child_value('mdata_ver') # Game requests mdata 3 times per profile for some reason + if mdata_ver != 1: + root = Node.void('gametop') + datanode = Node.void('data') + root.add_child(datanode) + player = Node.void('player') + datanode.add_child(player) + player.add_child(Node.s32('jid', extid)) + playdata = Node.void('playdata') + player.add_child(playdata) + playdata.set_attribute('count', '0') + return root root = self.get_scores_by_extid(extid) if root is None: root = Node.void('gametop') @@ -646,7 +658,6 @@ class JubeatSaucer( return newprofile def format_scores(self, userid: UserID, profile: ValidatedDict, scores: List[Score]) -> Node: - scores = self.data.remote.music.get_scores(self.game, self.version, userid) root = Node.void('gametop') datanode = Node.void('data') diff --git a/bemani/backend/jubeat/saucerfulfill.py b/bemani/backend/jubeat/saucerfulfill.py index a9493cb..466b102 100644 --- a/bemani/backend/jubeat/saucerfulfill.py +++ b/bemani/backend/jubeat/saucerfulfill.py @@ -265,6 +265,18 @@ class JubeatSaucerFulfill( data = request.child('data') player = data.child('player') extid = player.child_value('jid') + mdata_ver = player.child_value('mdata_ver') # Game requests mdata 3 times per profile for some reason + if mdata_ver != 1: + root = Node.void('gametop') + datanode = Node.void('data') + root.add_child(datanode) + player = Node.void('player') + datanode.add_child(player) + player.add_child(Node.s32('jid', extid)) + playdata = Node.void('playdata') + player.add_child(playdata) + playdata.set_attribute('count', '0') + return root root = self.get_scores_by_extid(extid) if root is None: root = Node.void('gametop') @@ -743,7 +755,6 @@ class JubeatSaucerFulfill( return newprofile def format_scores(self, userid: UserID, profile: ValidatedDict, scores: List[Score]) -> Node: - scores = self.data.remote.music.get_scores(self.game, self.version, userid) root = Node.void('gametop') datanode = Node.void('data')