86 Commits

Author SHA1 Message Date
ThatzOkay
abe480d007 remove duplicate method 2025-08-23 20:35:58 +02:00
Hay1tsme
ada9377c06 ongeki: remove BM card duplicate check 2025-04-09 18:09:41 -04:00
Hay1tsme
2640f23a00 ongeki: fix opt reader 2025-04-09 00:10:54 -04:00
Hay1tsme
9a14e54328 ongeki: add opts to reader 2025-04-08 17:59:19 -04:00
Hay1tsme
1cab68006d add opt static tables 2025-04-07 18:31:11 -04:00
Dniel97
fbcc53aeae ongeki: update ongeki_static_tech_music_uk 2025-03-26 21:20:22 +01:00
Dniel97
a2f71dc553 ongeki: bright MEMORY Act.3 support added 2025-03-26 15:25:34 +01:00
Hay1tsme
360dfdfdc1 Merge pull request 'ongeki: use the latest applicable version' (#200) from akanyan/artemis:fix/ongeki/versions into develop
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/200
2025-02-22 15:24:55 +00:00
Hay1tsme
0f52b89033 remove deprecated warn 2025-02-21 23:51:59 -05:00
akanyan
59a3c28134 ongeki: use the latest applicable version 2025-01-20 22:34:05 +00:00
Midorica
b62e9beb67 Merge pull request 'ongeki: proper handling of music ranking list' (#195) from akanyan/artemis:feat/ongeki/music-ranking into develop
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/195
2025-01-14 02:31:51 +00:00
akanyan
fa667d15f2 ongeki: proper handling of music ranking list 2025-01-06 18:39:49 +00:00
akanyan
ab64eea5c9 ongeki: read music version from the xml 2024-12-30 18:31:22 +00:00
beerpsi
58a5177a30 use SQL's limit/offset pagination for nextIndex/maxCount requests (#185)
Instead of retrieving the entire list of items/characters/scores/etc. at once (and even store them in memory), use SQL's `LIMIT ... OFFSET ...` pagination so we only take what we need.

Currently only CHUNITHM uses this, but this will also affect maimai DX and O.N.G.E.K.I. once the PR is ready.

Also snuck in a fix for CHUNITHM/maimai DX's `GetUserRivalMusicApi` to respect the `userRivalMusicLevelList` sent by the client.

### How this works

Say we have a `GetUserCharacterApi` request:

```json
{
    "userId": 10000,
    "maxCount": 700,
    "nextIndex": 0
}
```

Instead of getting the entire character list from the database (which can be very large if the user force unlocked everything), add limit/offset to the query:

```python
select(character)
.where(character.c.user == user_id)
.order_by(character.c.id.asc())
.limit(max_count + 1)
.offset(next_index)
```

The query takes `maxCount + 1` items from the database to determine if there is more items than can be returned:

```python
rows = ...

if len(rows) > max_count:
    # return only max_count rows
    next_index += max_count
else:
    # return everything left
    next_index = -1
```

This has the benefit of not needing to load everything into memory (and also having to store server state, as seen in the [`SCORE_BUFFER` list](2274b42358/titles/chuni/base.py (L13)).)

Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/185
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
2024-11-16 19:10:29 +00:00
zaphkito
51f65f9293 ongeki: I forgot json load 2024-06-18 04:15:40 +00:00
zaphkito
766912c51d ongeki: fix base version title work 2024-06-18 03:13:32 +00:00
Kevin Trocolli
e69922d91b ongeki: fix frontend versions 2024-06-09 03:14:43 -04:00
akanyan
f8db1e2149 ongeki: fix clearstatus type 2024-05-29 18:59:07 +09:00
Midorica
4c33dac96a Ongeki: fixed missing await under get_tech_count 2024-05-01 07:57:21 -04:00
beerpsi
d5c80cfb0f [mai2/chuni/ongeki] Properly ignore guest plays (#132)
For all three games, guest plays are created using:
```python
0x1000000000001 | ((allnet_place_id & 65535) << 32)
```

Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/132
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
2024-04-24 17:00:01 +00:00
Kumubou
1346bab911 Implement get_tech_count (it was stubbed out) 2024-04-17 00:45:05 +00:00
Kumubou
39fc5772eb Fix handle_get_user_tech_count_api_request so that it'll properly return tech award counts 2024-04-17 00:43:34 +00:00
Kevin Trocolli
10582cc1fc ongeki: fix frontend profiles not loading due to missing await 2024-03-29 20:09:22 -04:00
beerpsi
40a0817009 CHUNITHM & O.N.G.E.K.I.: Handle userRatingBase*List (#113)
These tables are not used by the game, but are useful for anyone wanting to develop a web UI showing what the player's rating consists of. As such, instead of storing them in JSON columns, I've split them out, one row per each entry.

Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/113
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
2024-03-14 14:44:32 +00:00
Hay1tsme
6557cac55b ongeki: add support for bright memory act 2 final 2024-03-07 15:20:02 -05:00
Kevin Trocolli
3559d56ccf cm: add awaits (fixes #104) 2024-03-02 17:55:41 -05:00
Hay1tsme
d4e00781c8 ongeki: Fix error loading user music (#100) 2024-02-12 11:40:24 -05:00
Hay1tsme
6ed80ecbab fix ongeki and sao 2024-01-22 15:49:06 -05:00
Kevin Trocolli
97e5c29cf5 frontend: utf16 -> utf8 2024-01-13 17:15:02 -05:00
Hay1tsme
e80b0671c2 frontend: add charset=utf16 2024-01-12 18:03:44 -05:00
Kevin Trocolli
06e7288cad ongeki: fix frontend page 2024-01-09 21:16:22 -05:00
Hay1tsme
c680c2d4e9 readd get_title_port_ssl 2024-01-09 17:49:18 -05:00
Hay1tsme
2d95e29f3c remove unused imports 2024-01-09 15:59:58 -05:00
Hay1tsme
9dab26b122 port frontend changes from different project 2024-01-09 15:54:34 -05:00
Hay1tsme
05586df08a move to async database 2024-01-09 14:42:17 -05:00
Hay1tsme
edd3ce8ead move to alembic 2024-01-09 13:57:59 -05:00
Kevin Trocolli
14fa0f5e8e begin move 2024-01-09 03:07:04 -05:00
Hay1tsme
262155f83f ongeki: fix handle_upsert_client_setting_api_request 2023-12-04 11:40:20 -05:00
Hay1tsme
936316f129 ongeki: fix put_client_setting_data 2023-12-04 11:34:58 -05:00
Kevin Trocolli
662fd05d24 ongeki: bump schema ver, fix error if events lookup fails 2023-11-29 18:56:57 -05:00
phantomlan
cf0c34cafb fixup technical challenge event 2023-11-26 00:12:23 +01:00
phantomlan
dcebc5c21a update item.py put_mission_point 2023-11-15 15:11:39 +01:00
Midorica
c9a20b2433 ongeki: fixing render_POST 2023-11-13 10:47:39 -05:00
Midorica
1034a505f0 fixing get_allnet_info for cxb, sao and ongeki 2023-11-13 10:43:38 -05:00
phantomlan
b56a5f020b add rollback sql
move GP support to table in DB
small fixes
2023-11-13 03:26:09 +01:00
phantomlan
d663b1ef7c fix foreign key issue 2023-11-13 03:03:04 +01:00
phantomlan
31d39ffb37 merge conflict fix 2023-11-13 02:01:56 +00:00
phantomlan
530016ef84 i ate one ) 2023-11-13 02:01:56 +00:00
phantomlan
f81c53558e - Add ClientTestmode upsert
- Add ClientSetting upsert
- Add endDate for Events
- Add Upgrade Schema
- Small bugfixes for events
2023-11-13 02:01:56 +00:00
phantomlan
d2e2c14074 update Event Ranking, Tech Challenge, and Music Ranking 2023-11-13 02:01:56 +00:00