MUSECA: API and webui fixes for Museca PLUS
This commit is contained in:
parent
82a67e0792
commit
1a4a231066
@ -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
|
||||
|
@ -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')
|
||||
|
@ -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 [
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user