Merge pull request 'develop' (#1) from Hay1tsme/artemis:develop into develop

Reviewed-on: ThatzOkay/artemis#1
This commit is contained in:
ThatzOkay 2024-05-29 09:13:37 +00:00
commit e15caeaa8f
7 changed files with 43 additions and 2 deletions

View File

@ -1,6 +1,9 @@
# Changelog
Documenting updates to ARTEMiS, to be updated every time the master branch is pushed to.
## 20240526
+ Fixed missing awaits causing coroutine error
## 20240524
### DIVA
+ Fixed new profile start request causing coroutine error

View File

@ -0,0 +1,28 @@
"""cxb_add_playlog_grade
Revision ID: 7dc13e364e53
Revises: 2d024cf145a1
Create Date: 2024-05-28 22:31:22.264926
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '7dc13e364e53'
down_revision = '2d024cf145a1'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('cxb_playlog', sa.Column('grade', sa.Integer(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('cxb_playlog', 'grade')
# ### end Alembic commands ###

View File

@ -17,6 +17,11 @@
<th>Params</th>
</tr>
</thead>
{% if events is not defined or events|length == 0 %}
<tr>
<td colspan="10" style="text-align:center"><i>No Events</i></td>
</tr>
{% endif %}
</table>
<div id="div_tbl_ctrl">
<select id="sel_per_page" onchange="update_tbl()">
@ -40,6 +45,7 @@ var per_page = 0;
var page = 0;
function update_tbl() {
if (TBL_DATA.length == 0) { return; }
var tbl = document.getElementById("tbl_events");
for (var i = 0; i < per_page; i++) {

View File

@ -40,6 +40,7 @@ class CxbRev(CxbBase):
score_data["slow2"],
score_data["fail"],
score_data["combo"],
score_data["grade"],
)
return {"data": True}
return {"data": True}

View File

@ -39,6 +39,7 @@ playlog = Table(
Column("slow2", Integer),
Column("fail", Integer),
Column("combo", Integer),
Column("grade", Integer),
Column("date_scored", TIMESTAMP, server_default=func.now()),
mysql_charset="utf8mb4",
)
@ -104,6 +105,7 @@ class CxbScoreData(BaseData):
this_slow2: int,
fail: int,
combo: int,
grade: int,
) -> Optional[int]:
"""
Add an entry to the user's play log
@ -123,6 +125,7 @@ class CxbScoreData(BaseData):
slow2=this_slow2,
fail=fail,
combo=combo,
grade=grade,
)
result = await self.execute(sql)

View File

@ -54,7 +54,7 @@ class DivaCustomizeItemData(BaseData):
Given a game version and an aime id, return the cstmz_itm_have hex string
required for diva directly
"""
items_list = self.get_customize_items(aime_id, version)
items_list = await self.get_customize_items(aime_id, version)
if items_list is None:
items_list = []
item_have = 0

View File

@ -50,7 +50,7 @@ class DivaModuleData(BaseData):
Given a game version and an aime id, return the mdl_have hex string
required for diva directly
"""
module_list = self.get_modules(aime_id, version)
module_list = await self.get_modules(aime_id, version)
if module_list is None:
module_list = []
module_have = 0