Commit Graph

34 Commits

Author SHA1 Message Date
10d38e14ae config: fix typo preventing ssl_cert from working correctly 2025-09-26 13:59:12 -04:00
33b7db0e98 Added support for multiple Allnet Lite keys + extras 2025-05-31 20:04:28 +12:00
4875caab93 ChimeDB qr code lookup/userid complete 2025-05-31 12:23:40 +12:00
5e5365d22b Allnet Lite Power On Support 2025-05-31 07:15:35 +12:00
ce475e801b allnet: save billing traces 2025-04-17 20:11:33 -04:00
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: #185
Co-authored-by: beerpsi <beerpsi@duck.com>
Co-committed-by: beerpsi <beerpsi@duck.com>
2024-11-16 19:10:29 +00:00
b7a006f7ee core: pushing changes regarding MySQL ssl toggle that is now mandatory 2024-11-12 10:53:02 -05:00
b462a2720a fix database config field protocol 2024-02-14 16:56:40 -05:00
8864b2625d fix proxy ports 2024-01-22 16:21:49 -05:00
7cf8b4fd5f aimedb: allow listen address override 2024-01-14 16:48:41 -05:00
bb752563cc aimedb: add enable toggle 2024-01-11 12:25:35 -05:00
6dd46a5aa7 fix default config typo 2024-01-11 12:09:19 -05:00
fb36cc9b07 configuration changes, update docs 2024-01-11 12:08:22 -05:00
c680c2d4e9 readd get_title_port_ssl 2024-01-09 17:49:18 -05:00
9dab26b122 port frontend changes from different project 2024-01-09 15:54:34 -05:00
14fa0f5e8e begin move 2024-01-09 03:07:04 -05:00
ed2d306dee adb: add configurable auth id lifetime 2023-11-30 18:22:01 -05:00
46f61325cb aimedb: soft impl of auth ids 2023-11-29 18:01:19 -05:00
cb8eaae2c0 Per-version URI/Host (#66)
Allows setting allnet uri/host response based on things like version, config files, and other factors to accommodate a wider range of potential setups under the same roof. This DOES require all titles to adopt a new structure but it's documented and should hopefully be somewhat intuitive.

Co-authored-by: Hay1tsme <kevin@hay1ts.me>
Reviewed-on: #66
Co-authored-by: Kevin Trocolli <pitok236@gmail.com>
Co-committed-by: Kevin Trocolli <pitok236@gmail.com>
2023-11-09 02:17:48 +00:00
93b8b86b55 Adding base handler & config for HTTPS title support 2023-10-17 13:12:08 -04:00
4f0a5f60ab Added config for reboot time support 2023-10-16 13:22:18 +00:00
b5ccd67940 db: add memcache toggle 2023-10-05 22:16:50 -04:00
2e8d99e5fa allnet: add ip check config option 2023-08-20 23:25:50 -04:00
4744e8cf5f add ip checking config options 2023-08-08 10:24:28 -04:00
03cf535ff6 make threading optional 2023-07-08 00:34:55 -04:00
238d437519 reformat with black in preperation for merge to master 2023-04-23 21:04:52 -04:00
47f4aaddf8 allnet: add download order infrastructure 2023-04-23 19:00:30 -04:00
6fa0175baa print cleanup, remove unused mucha options 2023-03-12 01:59:12 -05:00
a76bb94eb1 let black do it's magic 2023-03-09 11:38:58 -05:00
3f40e083ce add mucha config to coreconfig 2023-02-21 16:46:43 -05:00
8616c6d064 copy allnet functionality over 2023-02-18 00:00:30 -05:00
9ee155792e add mucha handler, fix CXB log duplication 2023-02-17 01:37:59 -05:00
f18e939dd0 change to using txroutes 2023-02-16 17:13:41 -05:00
32879491f4 Begin the process of transitioning from megaime 2023-02-16 00:06:42 -05:00