Add support for Jubeat omnimix on frontend
This commit is contained in:
parent
3b10423955
commit
3c1054b54c
@ -3,7 +3,7 @@ import re
|
|||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
from flask import Blueprint, request, Response, url_for, abort
|
from flask import Blueprint, request, Response, url_for, abort
|
||||||
|
|
||||||
from bemani.common import ID, GameConstants, RegionConstants
|
from bemani.common import ID, GameConstants, RegionConstants, DBConstants
|
||||||
from bemani.data import UserID
|
from bemani.data import UserID
|
||||||
from bemani.frontend.app import loginrequired, jsonify, render_react
|
from bemani.frontend.app import loginrequired, jsonify, render_react
|
||||||
from bemani.frontend.iidx.iidx import IIDXFrontend
|
from bemani.frontend.iidx.iidx import IIDXFrontend
|
||||||
@ -195,7 +195,7 @@ def viewtopscores(musicid: int) -> Response:
|
|||||||
notecounts = [0, 0, 0, 0, 0, 0]
|
notecounts = [0, 0, 0, 0, 0, 0]
|
||||||
|
|
||||||
for version in versions:
|
for version in versions:
|
||||||
for omniadd in [0, 10000]:
|
for omniadd in [0, DBConstants.OMNIMIX_VERSION_BUMP]:
|
||||||
for chart in [0, 1, 2, 3, 4, 5]:
|
for chart in [0, 1, 2, 3, 4, 5]:
|
||||||
details = g.data.local.music.get_song(
|
details = g.data.local.music.get_song(
|
||||||
GameConstants.IIDX, version + omniadd, musicid, chart
|
GameConstants.IIDX, version + omniadd, musicid, chart
|
||||||
|
@ -3,7 +3,7 @@ import re
|
|||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
from flask import Blueprint, request, Response, url_for, abort
|
from flask import Blueprint, request, Response, url_for, abort
|
||||||
|
|
||||||
from bemani.common import ID, GameConstants, VersionConstants
|
from bemani.common import ID, GameConstants, VersionConstants, DBConstants
|
||||||
from bemani.data import UserID
|
from bemani.data import UserID
|
||||||
from bemani.frontend.app import loginrequired, jsonify, render_react
|
from bemani.frontend.app import loginrequired, jsonify, render_react
|
||||||
from bemani.frontend.jubeat.jubeat import JubeatFrontend
|
from bemani.frontend.jubeat.jubeat import JubeatFrontend
|
||||||
@ -195,22 +195,23 @@ def viewtopscores(musicid: int) -> Response:
|
|||||||
difficulties = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
difficulties = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||||
|
|
||||||
for version in versions:
|
for version in versions:
|
||||||
for chart in [0, 1, 2, 3, 4, 5]:
|
for omniadd in [0, DBConstants.OMNIMIX_VERSION_BUMP]:
|
||||||
details = g.data.local.music.get_song(
|
for chart in [0, 1, 2, 3, 4, 5]:
|
||||||
GameConstants.JUBEAT, version, musicid, chart
|
details = g.data.local.music.get_song(
|
||||||
)
|
GameConstants.JUBEAT, version, musicid, chart
|
||||||
if details is not None:
|
)
|
||||||
name = details.name
|
if details is not None:
|
||||||
artist = details.artist
|
name = details.name
|
||||||
genre = details.genre
|
artist = details.artist
|
||||||
if category < version:
|
genre = details.genre
|
||||||
category = version
|
if category < version:
|
||||||
if difficulties[chart] == 0.0:
|
category = version
|
||||||
difficulties[chart] = details.data.get_float("difficulty", 13)
|
if difficulties[chart] == 0.0:
|
||||||
if difficulties[chart] >= 13.0:
|
difficulties[chart] = details.data.get_float("difficulty", 13)
|
||||||
difficulties[chart] = float(
|
if difficulties[chart] >= 13.0:
|
||||||
details.data.get_int("difficulty", 13)
|
difficulties[chart] = float(
|
||||||
)
|
details.data.get_int("difficulty", 13)
|
||||||
|
)
|
||||||
|
|
||||||
if name is None:
|
if name is None:
|
||||||
# Not a real song!
|
# Not a real song!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user