1
0
mirror of synced 2024-11-12 01:00:46 +01:00

MUSECA: API and webui fixes for Museca PLUS

This commit is contained in:
seth 2020-12-06 02:21:28 +00:00 committed by Jennifer Taylor
parent 82a67e0792
commit 1a4a231066
4 changed files with 12 additions and 20 deletions

View File

@ -165,13 +165,10 @@ 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
else:
return self.version
def fetch_v1(self, idtype: str, ids: List[str], params: Dict[str, Any]) -> Dict[str, List[Dict[str, Any]]]:
# Verify IDs

View File

@ -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')

View File

@ -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 [

View File

@ -185,8 +185,9 @@ def viewtopscores(musicid: int) -> Response:
difficulties = [0, 0, 0, 0, 0]
for version in versions:
for omniadd in [0, 10000]:
for chart in [0, 1, 2, 3, 4]:
details = g.data.local.music.get_song(GameConstants.MUSECA, version, musicid, chart)
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