Commit Graph

80 Commits

Author SHA1 Message Date
MingxuanGame
1163a93053 refactor(scores): rename models of score to match with filename 2025-10-04 08:01:38 +00:00
MingxuanGame
d490239f46 chore(linter): update ruff rules 2025-10-03 15:46:53 +00:00
MingxuanGame
d23f32f08d refactor(log): refactor the whole project
format: {time:YYYY-MM-DD HH:mm:ss} [{level}] | {name} | {message}
{name} is:
- Uvicorn: log from uvicorn server (#228B22)
- Service: log from class of `app.service` (blue)
- Fetcher: log from fetchers (magenta)
- Task: log from `app.tasks` (#FFD700)
- System: log from `system_logger` (red)
- Normal: log from `log(name)` (#FFC1C1)
- Default: the module name of caller

if you are writing services or tasks, you can just call `logger.`, we will pack it with name `Service` or `Task`
if you want to print fetcher logs, system-related logs, or normal logs, use `logger = (fetcher_logger / system_logger / log)(name)`
2025-10-03 11:53:05 +00:00
MingxuanGame
37b4eadf79 refactor(database): rename filename to find the models by table name easily 2025-10-03 03:33:47 +00:00
MingxuanGame
f31056ced3 perf(score): divide score processing into small parts and make them run in background
resolve #47
2025-10-02 14:30:57 +00:00
MingxuanGame
3f6776847e feat(beatmap,score): update beatmaps from Bancho & deleting scores (#50)
New API:

- DELETE /api/private/score/{score_id}: delete a score
- POST /api/private/beatmapsets/{beatmapset_id}/sync: request for syncing a beatmapset

New configuration:

- OLD_SCORE_PROCESSING_MODE
2025-10-02 13:36:09 +08:00
MingxuanGame
19f94fffbb feat(api): 支持 x-api-version (#29)
* feat(relationship): support legacy-compatible response format

* feat(score): add support for legacy score response format in API

* fix(score): avoid missing greenlet

* fix(score): fix missing field for model validation

* feat(user): apply legacy score format for user

* feat(api): use `int` to hint `APIVersion`
2025-09-14 14:09:53 +08:00
MingxuanGame
e872c25918 fix(score): make scores of loved beatmap as ranked scores 2025-08-30 11:49:23 +00:00
MingxuanGame
224e890e31 feat(recalculate): add scheduled job to recalculate failed scores 2025-08-28 16:53:15 +00:00
MingxuanGame
7ec716d4de feat(user): support get the user's first scores 2025-08-26 16:42:57 +00:00
MingxuanGame
bc12182770 fix(user): rank lost event uses the owner of the displaced score's username 2025-08-26 15:53:32 +00:00
MingxuanGame
60745c1269 feat(score): auto recalculate for banned beatmaps
Running every hour
2025-08-26 15:12:14 +00:00
MingxuanGame
900fa9b121 fix(score): fix incorrect best_id 2025-08-26 13:18:11 +08:00
MingxuanGame
9681aa68b4 feat(banchobot): show weighted pp in score commands 2025-08-26 13:18:11 +08:00
MingxuanGame
9d92fa0a68 fix(score): fix score process 2025-08-26 13:18:11 +08:00
MingxuanGame
9b00dbda28 refactor(project): use unified utcnow 2025-08-22 11:27:45 +00:00
MingxuanGame
598fcc8b38 refactor(project): make pyright & ruff happy 2025-08-22 08:21:52 +00:00
咕谷酱
ce465aa049 整理代码 2025-08-22 05:57:28 +08:00
咕谷酱
71e5f1815e 修复多人游戏成绩上传报错 2025-08-22 02:26:39 +08:00
咕谷酱
36b695b531 fix error 2025-08-22 00:32:37 +08:00
咕谷酱
49ac399180 fix Failed to refresh user cache after score submit 2025-08-22 00:25:58 +08:00
咕谷酱
80d4237c5d ruff fix 2025-08-22 00:07:19 +08:00
咕谷酱
ad51514fb1 fix Pydantic serializer warnings 2025-08-21 23:48:58 +08:00
咕谷酱
822d7c6377 Add grade hot cache 2025-08-21 23:35:25 +08:00
MingxuanGame
1104ff6c54 feat(score): don't include in best performance for 0pp 2025-08-21 11:43:36 +00:00
MingxuanGame
ce756c354b fix(statistics): run recalculate independently 2025-08-19 13:45:12 +00:00
MingxuanGame
b5b14f5466 fix(score): cannot fetch leaderboard with mods 2025-08-18 12:49:06 +00:00
MingxuanGame
1aa0d42e79 fix(score): duplicated score when processing leaderboard scores 2025-08-18 11:08:20 +00:00
MingxuanGame
7510b4fae1 fix(score): return user score & remove duplicated scores 2025-08-18 09:49:02 +00:00
咕谷酱
7f512cec6e Optimization of score calculation 2025-08-18 17:16:44 +08:00
MingxuanGame
219f19d623 feat(beatmap,score): support failtime & more exact playtime 2025-08-18 08:48:13 +00:00
MingxuanGame
11b8f799a0 feat(score): support recalculate statistics 2025-08-17 05:48:36 +00:00
MingxuanGame
f1c0e089b4 fix(score): a score with higher total score doesn't replace the old score 2025-08-17 03:32:24 +00:00
MingxuanGame
814d9c4618 refactor(detector): more readable 2025-08-15 08:52:01 +00:00
MingxuanGame
1251ba31a2 feat(score): support rx for taiko & catch 2025-08-15 05:59:21 +00:00
MingxuanGame
155905f652 fix(event): trigger rank when submitting score 2025-08-14 14:11:52 +00:00
MingxuanGame
2912e68c7b fix(event): fix incorrect call settings.frontend_url 2025-08-14 13:36:29 +00:00
MingxuanGame
46a1d049fe refactor(score): replace MODE_TO_INT INT_TO_MODE with int(mode) GameMode.from_int 2025-08-14 13:04:59 +00:00
MingxuanGame
48b075d99d feat(config): add ENABLE_ALL_BEATMAP_PP 2025-08-14 07:01:41 +00:00
MingxuanGame
ebbc0b8252 feat(score): allow to recalculate all score pp 2025-08-14 06:50:17 +00:00
chenjintang-shrimp
c0ccdfa65b feat(event): 添加排名丢失事件
- 在用户得分进入前50名或前1%时,检查是否有其他用户的排名被取代
- 如果有用户排名被取代,创建排名丢失事件
2025-08-13 17:36:19 +00:00
chenjintang-shrimp
3f31785428 feat(database): 添加全球排名事件触发逻辑
- 在 ScoreResp 类中添加逻辑,判断玩家是否进入全球前 50 或前 1% 排名
2025-08-13 17:17:39 +00:00
MingxuanGame
7a6a548a65 fix(statistics): fix levels 2025-08-13 10:37:51 +00:00
MingxuanGame
46746f5b71 fix(score): don't show pp in profile 2025-08-13 09:04:06 +00:00
MingxuanGame
69e9927ea0 fix(score): fix incomplete statistics in leaderboard & wrong statistics in replay 2025-08-13 04:01:19 +00:00
MingxuanGame
71c27b38f5 fix(score): change processed to True to show pp in profile 2025-08-12 15:05:19 +00:00
MingxuanGame
b9babb8f24 feat(score): support download replay 2025-08-11 08:19:05 +00:00
MingxuanGame
a4e095c9ea fix(statistics): add length of beatmap to PT instead of ended_at - started_at 2025-08-10 15:42:58 +00:00
MingxuanGame
32e2ac5704 feat(score): support pin score 2025-08-10 15:36:39 +00:00
MingxuanGame
02051289e9 fix(statistics): extra pp from other modes 2025-08-10 11:35:41 +00:00