Commit Graph

353 Commits

Author SHA1 Message Date
Hay1tsme
882560a790 adb: fix semantics with FelicaLookupEx 2025-03-21 09:47:44 -04:00
Hay1tsme
376b77be29 frontend: serial rollover after 9999 generated serials 2025-03-20 14:53:28 -04:00
Hay1tsme
399f983bea allnet: fix download order response, billing logging 2025-03-02 04:10:06 -05:00
Hay1tsme
0f52b89033 remove deprecated warn 2025-02-21 23:51:59 -05:00
akanyan
fa667d15f2 ongeki: proper handling of music ranking list 2025-01-06 18:39:49 +00:00
Hay1tsme
e93fcfd706 Merge pull request 'Fix: AimeDB Felica LookupEx rename package parameter' (#188) from SoulGateKey/artemis:lookup_fix into develop
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/188
2024-12-19 06:41:02 +00:00
Kevin Trocolli
b81d5c9cc5 adb: fix minor logging typo 2024-12-19 01:37:50 -05:00
Hay1tsme
6a305d2514 Merge pull request '[database] fix invalid transaction being left open' (#187) from beerpsi/artemis:fix/invalid-transaction into develop
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/187
2024-12-19 06:14:45 +00:00
beerpsi
d6d98d20cb fix: typing shenanigans 2024-12-12 20:47:34 +07:00
SoulGateKey
5ecc7984c7 Fix: AimeDB Felica LookupEx rename package parameter 2024-12-08 08:44:32 +08:00
Kevin Trocolli
a8f5ef1550 allnet: properly dfi encode downloadorder responses 2024-12-01 14:19:55 -05:00
beerpsi
476a911df9 [database] fix invalid transaction being left open 2024-11-25 20:13:51 +07: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
beerpsi
789d50c406 use AsyncSession directly
see the warnings in https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html#using-asyncio-scoped-session
2024-11-14 13:10:14 +07:00
beerpsi
bc7524c8fc fix: make database async 2024-11-14 12:36:22 +07:00
Midorica
b7a006f7ee core: pushing changes regarding MySQL ssl toggle that is now mandatory 2024-11-12 10:53:02 -05:00
daydensteve
c2d4abcc26 db and import updates for userbox, avatar, voice, and map icon 2024-11-03 16:37:05 -05:00
Kevin Trocolli
0cef797a8a mai2: rework photo uploads, relates to #67 2024-10-06 03:47:10 -04:00
ppc
f47175a144 [mai2] add buddies plus support (#177)
Adds favorite music support (there's an option in the results screen to star a song), handlers for new methods and fixes upsert failures for `userFavoriteList`.
The `UserIntimateApi` has been added but didn't seem to add any data during testing, and `CreateTokenApi`/`RemoveTokenApi` have also been added but I think they're only used during guest play.

---
Tested on 1.45 with no errors/game crashes (see logs). Card Maker hasn't been tested as I don't have a setup to play with.

Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/177
Co-authored-by: ppc <albie@ppc.moe>
Co-committed-by: ppc <albie@ppc.moe>
2024-09-23 17:21:29 +00:00
ppc
1db020b5fc fix generated keychip validation failures 2024-09-09 16:53:14 +00:00
Hay1tsme
d1048694d4 Fix --config option not being respected, fixes #172 2024-09-06 10:36:57 -04:00
Kevin Trocolli
5c497032f1 frontend: "Edit Card" -> "Card Information" 2024-08-09 02:43:39 -04:00
Kevin Trocolli
06a7fdb1b1 frontend: implement add/edit card 2024-08-09 02:37:34 -04:00
Hay1tsme
68bbde209a aimedb: add warning for all-zero access code/idm 2024-07-18 13:30:46 -04:00
Hay1tsme
02cee4198d aimedb: block all-zero access codes and idms 2024-07-18 13:26:57 -04:00
Kevin Trocolli
6a43e0eada update keychip serial generation code 2024-07-09 15:10:42 -04:00
Hay1tsme
d7e8c9b490 frontend: fix event log buttons 2024-07-06 23:20:04 -04:00
Hay1tsme
c65c71e89e card: add memos 2024-07-06 23:13:41 -04:00
Kevin Trocolli
44fb6037cf chuni: add missing alembic script 2024-06-29 00:08:11 -04:00
Hay1tsme
4446ff1f21 mai2: add present support 2024-06-28 15:48:27 -04:00
Hay1tsme
7242a187ab sao: fix sao_hero_log_data nullability 2024-06-28 12:25:33 -04:00
Kevin Trocolli
601cec9075 sao: you already know what it is 2024-06-27 10:02:19 -04:00
Kevin Trocolli
177f851368 sao: cleanup 2024-06-27 00:07:10 -04:00
Kevin Trocolli
40a66614bc sao: fix user_hero_log_id 2024-06-27 00:04:23 -04:00
Kevin Trocolli
171131493f sao: fix new issues 2024-06-26 23:57:07 -04:00
Kevin Trocolli
c13b096190 sao: split massive upgrade in half and hope it works 2024-06-26 23:31:59 -04:00
Kevin Trocolli
5eb2ef8311 sao: schema fixes 3: the misery never ends 2024-06-26 23:01:47 -04:00
Kevin Trocolli
f27f789269 sao: alembic sucks sometimes. 2024-06-26 22:37:56 -04:00
Kevin Trocolli
7206af83cb sao: fix upgrade script 2024-06-26 22:30:12 -04:00
Kevin Trocolli
e91f84fecc sao: backport changes from diana 2024-06-25 14:02:53 -04:00
Kevin Trocolli
6ae11f96a2 aimedb: fix idm zfill issue 2024-06-24 22:28:22 -04:00
Hay1tsme
8f9e9d4766 fix downgrade script issue referenced in #156 2024-06-24 13:37:10 -04:00
Kevin Trocolli
bdbb22f164 logic fix 2024-06-23 22:19:27 -04:00
Kevin Trocolli
068aa5eaa3 prevent setting chipid if it's 0x04030201 2024-06-23 22:09:56 -04:00
Kevin Trocolli
3979a020a6 add idm and chip_id fields to card table 2024-06-22 00:47:12 -04:00
Kevin Trocolli
ca9ccbe8a3 chuni: add missing net battle funcs 2024-06-21 23:00:35 -04:00
beerpsi
5378655c52 [chunithm] Support LUMINOUS 2024-06-20 08:11:24 +07:00
Kevin Trocolli
784ac544f0 fix event log ordering, paging, add timestamp 2024-06-16 14:42:23 -04:00
Kevin Trocolli
00224585bb pokken: fix pokemon_data uk 2024-06-14 00:06:39 -04:00
Kevin Trocolli
e21568cfd9 pokken: fix profile loading fail 2024-06-12 23:24:45 -04:00
Kevin Trocolli
e69922d91b ongeki: fix frontend versions 2024-06-09 03:14:43 -04:00
Kevin Trocolli
b4b8650acc mai2: add basic webui 2024-06-09 03:05:57 -04:00
Kevin Trocolli
79f511c837 frontend: add username login 2024-06-08 19:18:15 -04:00
Kevin Trocolli
f94d22ab0d mai2: add tables for rivals and favorite music 2024-06-08 19:04:27 -04:00
akanyan
df2a4d3074 ongeki: clearstatus db migration 2024-05-29 19:15:22 +09:00
Kevin Trocolli
a2fe83ae06 cxb: add grade to playlog 2024-05-28 22:32:38 -04:00
Hay1tsme
12f035b7e5 add no logs message to event viewer 2024-05-26 22:49:05 -04:00
Kevin Trocolli
e66ae91740 add basic event log viewer 2024-05-22 01:36:41 -04:00
Kevin Trocolli
4ee4c26f5e allnet: enhance logging 2024-05-22 00:05:32 -04:00
Kevin Trocolli
a9587a9c91 add additional details to event_log 2024-05-21 23:05:22 -04:00
Kevin Trocolli
3ed8d9c16b update get_mucha_info documentation 2024-05-19 21:40:02 -04:00
beerpsi
960cf73a04 [allnet] Enable DFI-encoded responses 2024-04-30 22:34:41 +07:00
MEANINGLINK
976aa6b560 CHUNI: Add more chunithm frontend features
1. Implemented profile, rating and playlog webpages.
2. Fixed bugs of version change api and name change api.
2024-04-23 22:43:45 +08:00
Hay1tsme
926713431d Merge branch 'develop' of https://gitea.tendokyu.moe/Hay1tsme/artemis into develop 2024-04-02 16:43:16 -04:00
Hay1tsme
1072a9d63b database: fix create_revision_auto 2024-04-02 16:43:13 -04:00
Kevin Trocolli
7e709db0cc fix get_ip_addr 2024-03-29 20:13:15 -04:00
Hay1tsme
87c7c91e3a add ability to add users, cards, arcades and cabs on the webui 2024-03-23 20:01:32 -04:00
Dniel97
3613f4dbd2
mai2: BUDDiES support added 2024-03-20 21:42:38 +01: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
Kevin Trocolli
b63c2c2d12 dbutils: add autocreate option to revision 2024-03-11 21:24:57 -04:00
Kevin Trocolli
c4deff9d1c add database downgrading 2024-03-04 00:50:51 -05:00
Kevin Trocolli
e69149632f frontend: fix namechange and password change failing 2024-03-02 17:52:01 -05:00
Kevin Trocolli
bd97428166 frontend: fix account and owner creation (fixes #108) 2024-03-02 17:48:48 -05:00
Kevin Trocolli
4363b8321b mucha: UTC_SERVER_TIME -> SERVER_TIME_UTC 2024-02-24 16:49:02 -05:00
Hay1tsme
b462a2720a fix database config field protocol 2024-02-14 16:56:40 -05:00
Hay1tsme
89c2b324dc aimedb: add last login time update to register endpoints 2024-02-12 15:58:02 -05:00
Hay1tsme
4149944d56 aimedb: update card last login time properly 2024-02-12 15:53:28 -05:00
Hay1tsme
348edef0f5 idac: add missing await 2024-01-22 16:35:43 -05:00
Hay1tsme
404496191d mucha: remove print statement 2024-01-22 16:25:51 -05:00
Hay1tsme
8864b2625d fix proxy ports 2024-01-22 16:21:49 -05:00
Hay1tsme
200bfe7d84 mucha: oops 2024-01-22 15:55:10 -05:00
Hay1tsme
9a021d4005 mucha: add shop info 2024-01-22 15:32:43 -05:00
Hay1tsme
66c9548dd2 mucha: move to starlette 2024-01-22 15:03:59 -05:00
Hay1tsme
029be55cc0 mucha: fix handlers 2024-01-22 14:59:53 -05:00
Hay1tsme
5c9570d421 allnet: fix placeid formatting 2024-01-22 14:47:36 -05:00
Hay1tsme
8d416d7633 allnet: add exception handling if get_allnet_info fails 2024-01-22 14:44:21 -05:00
Hay1tsme
384924335c allnet: populate title registry when launching standalone 2024-01-22 14:42:02 -05:00
Kevin Trocolli
7cf8b4fd5f aimedb: allow listen address override 2024-01-14 16:48:41 -05:00
Kevin Trocolli
e36989e7cc billing: fix overzealous find and replace 2024-01-14 16:43:25 -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
Hay1tsme
ae09c2ad48 chuni: add frontend 2024-01-12 18:03:11 -05:00
Kevin Trocolli
9a7d5bc689 fix logging 2024-01-11 21:01:51 -05:00
Kevin Trocolli
fc3f0900b3 dbutils: add create-revision command 2024-01-11 20:48:27 -05:00
Kevin Trocolli
19fd008598 fix legacy upgrade script 2024-01-11 20:39:29 -05:00
Hay1tsme
bb752563cc aimedb: add enable toggle 2024-01-11 12:25:35 -05:00
Hay1tsme
6dd46a5aa7 fix default config typo 2024-01-11 12:09:19 -05:00
Hay1tsme
fb36cc9b07 configuration changes, update docs 2024-01-11 12:08:22 -05:00
Kevin Trocolli
06e7288cad ongeki: fix frontend page 2024-01-09 21:16:22 -05:00
Kevin Trocolli
0a56207e90 frontend: fix cab list on arcade page 2024-01-09 20:08:10 -05:00