Commit Graph

144 Commits

Author SHA1 Message Date
SoulGateKey
18701576e3 add support for GetGameMusicScoreApi
the api is used to deliver charts from the server
for mai2 Prism and later
2025-07-24 20:20:08 +08:00
Hay1tsme
07c08a7070 Merge pull request 'chu&mai2: add option to use https' (#217) from zaphkito/artemis:chumai_https into develop
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/217
2025-07-13 05:22:18 +00:00
zaphkito
6e5a83f3d7 mai2: correct game code check when not encrypted and enable encrypted only 2025-06-14 12:24:07 +00:00
zaphkito
cf6666b866 mai2: fix Exp and Chn encryption 2025-06-14 15:07:55 +08:00
zaphkito
592e6961e8 chu&mai2: add option to use https 2025-06-14 14:51:21 +08:00
Keeboy99
02bfc7dba2 SDGB support + extras 2025-06-02 16:31:57 +12:00
Hay1tsme
8e83527e82 Merge pull request 'fix_mai2_internal_ver' (#211) from SoulGateKey/artemis:fix_mai2_internal_ver into develop
Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/211
2025-05-05 04:42:52 +00:00
SoulGateKey
f1a0557f94 fix mai2 internal ver 2025-05-01 17:30:06 +00:00
Hay1tsme
c955c1ae37 mai2: fix opt reader 2025-04-08 23:45:15 -04:00
Hay1tsme
47affd898f mai2: add opts to reader 2025-04-08 17:42:17 -04:00
Hay1tsme
a7077fb41c mai2: add prism to version lut 2025-04-07 23:16:06 -04:00
SoulGateKey
ecd4cc205e Add new KaleidxScope Condition handle method 2025-04-08 08:34:21 +08:00
SoulGateKey
e757990682 Merge pull request 'develop' (#5) from Hay1tsme/artemis:develop into prism_support
Reviewed-on: https://gitea.tendokyu.moe/SoulGateKey/artemis/pulls/5
2025-04-08 00:32:33 +00:00
SoulGateKey
ceee8e3477 Merge branch 'develop' into fix_mai2_present 2025-04-07 23:25:42 +00:00
SoulGateKey
ed2b6044ff mai2_item_present fixed 2025-04-08 11:18:40 +08:00
Hay1tsme
1cab68006d add opt static tables 2025-04-07 18:31:11 -04:00
SoulGateKey
9a7fc007bc standardization KaleidxScope variable names 2025-04-04 05:42:53 +08:00
SoulGateKey
3d84e32892 add Kaleidx Scope Support 2025-04-02 09:42:08 +08:00
SoulGateKey
d77d02c2dd database add Mai2Prism support 2025-04-02 06:42:28 +08:00
SoulGateKey
36354ae109 add GetUserKaleidxScopeApi handler 2025-04-02 05:46:44 +08:00
SoulGateKey
814c4fd284 add GetGameKaleidxScopeApi handler 2025-04-02 04:54:01 +08:00
SoulGateKey
6821ab6f46 add UploadUserPlaylogListApi handler for Exp version 2025-04-02 04:35:39 +08:00
SoulGateKey
6b1b607db0 add GetGameMusicScoreApi handler 2025-04-02 04:35:14 +08:00
SoulGateKey
fa94c029ca add GetUserNewItemListApi handler 2025-04-02 03:07:35 +08:00
SoulGateKey
1d545b2bd2 add const.py of prism 2025-04-02 02:32:34 +08:00
Hay1tsme
afdcd9a731 mai2: remove print statements from frontend 2025-03-22 00:58:49 -04:00
Hay1tsme
0f52b89033 remove deprecated warn 2025-02-21 23:51:59 -05:00
Kevin Trocolli
e8ea328e77 mai2: add add_consec_login call if get_consec_login returns None #189 2024-12-15 20:21:03 -05: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
SoulGateKey
f4dff9b4c1 fix: mai2 photos cant be merged 2024-11-11 21:16:19 +08:00
SoulGateKey
8a6250bebd Formatted log print
Change log level
2024-11-11 21:11:33 +08:00
SoulGateKey
f272e97eae Formatted log print
Change log level
2024-11-06 02:44:07 +08:00
SoulGateKey
aa7ae6cb51 Formatted log print 2024-11-06 02:38:18 +08:00
SoulGateKey
221517e310 TODO: GetUserScoreRankingApi 2024-10-30 12:37:18 +08:00
SoulGateKey
598e4aad76 Update mai2/schema/score.py to support new handle_get_game_ranking 2024-10-11 16:16:40 +00:00
SoulGateKey
a673d9dabd Delete unused dependency 2024-10-11 16:12:53 +00:00
SoulGateKey
398fa9059d Update mai2/base.py using the ORM 2024-10-11 16:09:53 +00:00
SoulGateKey
29f4a6a696 revert 033c1aa776
revert Update 卖
2024-10-11 16:08:15 +00:00
SoulGateKey
033c1aa776 Update 卖 2024-10-11 16:06:17 +00:00
SoulGateKey
bbf41ac83f Merge branch 'develop' into mai2_handle_get_game_ranking 2024-10-11 15:56:05 +00:00
Kevin Trocolli
0cef797a8a mai2: rework photo uploads, relates to #67 2024-10-06 03:47:10 -04:00
SoulGateKey
3843ac6eb1 mai2: calc GetGameRanking result 2024-10-03 19:32:17 +00: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
Hay1tsme
e85728f33c chuni/mai2: remove upsert from put_playlog 2024-09-20 17:10:48 -04:00
Hay1tsme
73dda06413 mai2: add warning about portrait uploading not being supported. #67 2024-09-05 11:37:52 -04:00
Hay1tsme
9b5283d389 mai2: add event editing for sysops 2024-07-01 18:26:39 -04:00
Kevin Trocolli
ecb2e9ec75 mai2: properly add present items 2024-06-28 23:55:23 -04:00
Kevin Trocolli
af8bd1d1c0 mai2: fix presents 2024-06-28 23:29:31 -04:00
Hay1tsme
4446ff1f21 mai2: add present support 2024-06-28 15:48:27 -04:00
Kevin Trocolli
e69922d91b ongeki: fix frontend versions 2024-06-09 03:14:43 -04:00