diff --git a/bemani/api/objects/catalog.py b/bemani/api/objects/catalog.py index eefe52e..1c3136a 100644 --- a/bemani/api/objects/catalog.py +++ b/bemani/api/objects/catalog.py @@ -165,11 +165,8 @@ class CatalogObject(BaseObject): @property def music_version(self) -> int: - if self.game == GameConstants.IIDX: - if self.omnimix: - return self.version + DBConstants.OMNIMIX_VERSION_BUMP - else: - return self.version + if self.omnimix: + return self.version + DBConstants.OMNIMIX_VERSION_BUMP else: return self.version diff --git a/bemani/api/objects/records.py b/bemani/api/objects/records.py index 8c36d10..38babbd 100644 --- a/bemani/api/objects/records.py +++ b/bemani/api/objects/records.py @@ -222,13 +222,10 @@ class RecordsObject(BaseObject): @property def music_version(self) -> int: - if self.game == GameConstants.IIDX: if self.omnimix: return self.version + DBConstants.OMNIMIX_VERSION_BUMP else: return self.version - else: - return self.version def fetch_v1(self, idtype: str, ids: List[str], params: Dict[str, Any]) -> List[Dict[str, Any]]: since = params.get('since') diff --git a/bemani/api/objects/statistics.py b/bemani/api/objects/statistics.py index 64ad19f..dc5c051 100644 --- a/bemani/api/objects/statistics.py +++ b/bemani/api/objects/statistics.py @@ -25,13 +25,10 @@ class StatisticsObject(BaseObject): @property def music_version(self) -> int: - if self.game == GameConstants.IIDX: if self.omnimix: return self.version + DBConstants.OMNIMIX_VERSION_BUMP else: return self.version - else: - return self.version def __is_play(self, attempt: Attempt) -> bool: if self.game in [ diff --git a/bemani/frontend/museca/endpoints.py b/bemani/frontend/museca/endpoints.py index b6af1ed..ba80fdf 100644 --- a/bemani/frontend/museca/endpoints.py +++ b/bemani/frontend/museca/endpoints.py @@ -185,15 +185,16 @@ def viewtopscores(musicid: int) -> Response: difficulties = [0, 0, 0, 0, 0] for version in versions: - for chart in [0, 1, 2, 3, 4]: - details = g.data.local.music.get_song(GameConstants.MUSECA, version, musicid, chart) - if details is not None: - if name is None: - name = details.name - if artist is None: - artist = details.artist - if difficulties[chart] == 0: - difficulties[chart] = details.data.get_int('difficulty') + for omniadd in [0, 10000]: + for chart in [0, 1, 2, 3, 4]: + details = g.data.local.music.get_song(GameConstants.MUSECA, version + omniadd, musicid, chart) + if details is not None: + if name is None: + name = details.name + if artist is None: + artist = details.artist + if difficulties[chart] == 0: + difficulties[chart] = details.data.get_int('difficulty') if name is None: # Not a real song!