Commit Graph

623 Commits

Author SHA1 Message Date
dependabot[bot]
a6c596318e chore(deps): bump the minor-and-patch group with 4 updates (#99)
* chore(deps): bump the minor-and-patch group with 4 updates

Bumps the minor-and-patch group with 4 updates: [apscheduler](https://github.com/agronholm/apscheduler), [fastapi](https://github.com/fastapi/fastapi), [sqlmodel](https://github.com/fastapi/sqlmodel) and [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator).


Updates `apscheduler` from 3.11.1 to 3.11.2
- [Release notes](https://github.com/agronholm/apscheduler/releases)
- [Commits](https://github.com/agronholm/apscheduler/compare/3.11.1...3.11.2)

Updates `fastapi` from 0.126.0 to 0.128.0
- [Release notes](https://github.com/fastapi/fastapi/releases)
- [Commits](https://github.com/fastapi/fastapi/compare/0.126.0...0.128.0)

Updates `sqlmodel` from 0.0.27 to 0.0.30
- [Release notes](https://github.com/fastapi/sqlmodel/releases)
- [Changelog](https://github.com/fastapi/sqlmodel/blob/main/docs/release-notes.md)
- [Commits](https://github.com/fastapi/sqlmodel/compare/0.0.27...0.0.30)

Updates `datamodel-code-generator` from 0.46.0 to 0.49.0
- [Release notes](https://github.com/koxudaxi/datamodel-code-generator/releases)
- [Changelog](https://github.com/koxudaxi/datamodel-code-generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/koxudaxi/datamodel-code-generator/compare/0.46.0...0.49.0)

---
updated-dependencies:
- dependency-name: apscheduler
  dependency-version: 3.11.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: fastapi
  dependency-version: 0.128.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: sqlmodel
  dependency-version: 0.0.30
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: datamodel-code-generator
  dependency-version: 0.49.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(linter): auto fix by pre-commit hooks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-28 17:26:53 +08:00
MingxuanGame
fed1471129 fix(multiplayer): channel is not set as mp channel again 2025-12-27 19:55:42 +08:00
MingxuanGame
a58b4cb172 fix(multiplayer): channel is not set as mp channel 2025-12-27 19:30:09 +08:00
MingxuanGame
e5a4a0d9e4 fix(playlist): add playlist and room parameters to ScoreModel transform 2025-12-27 19:04:37 +08:00
MingxuanGame
10095f7da2 fix(score): remove exclude flag from total_score_without_mods field 2025-12-27 18:50:14 +08:00
MingxuanGame
f628061971 feat(score_token): add room_id to score token table 2025-12-20 19:42:14 +08:00
MingxuanGame
a24302c2df feat(plugin): add PluginMeta model and JSON schema for plugin metadata 2025-12-13 18:22:31 +08:00
MingxuanGame
511150cc4c chore(ranked-mods): make Swap (osu!taiko) ranked
see https://osu.ppy.sh/home/changelog/lazer/2025.1209.0
2025-12-12 22:43:15 +08:00
MingxuanGame
e0c3e06ffe fix(bbcode): fix ReDos vulnerabilities in BBCodeService (#96)
* fix(bbcode): fix ReDos of imagemap parsing

* fix(bbcode): use `regex` and add timeout to avoid too long time to parse

* feat(bbcode): use `make_tag` to generate HTML tags

* docs(bbcode): add docstrings for BBCodeService

* fix(user): validate BBCode content before processing userpage update

* fix(bbcode): catch timeout errors in BBCode parsing with MaliciousBBCodeError

* fix(bbcode): resolve reviews

* fix(bbcode): use `make_tag` in `_parse_size`

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(bbcode): fix using `make_tag` in `_parse_size`

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 19:50:29 +08:00
MingxuanGame
a62ef049ff fix(user): don't invalidate user cache when user is connecting to spectator-server
resolve the sixth of #90
2025-12-06 21:30:00 +08:00
MingxuanGame
36f5bd2ab3 fix(relationship): fix missing greenlet when adding friends 2025-12-06 01:58:57 +08:00
MingxuanGame
e688d2777d chore(linter): make ruff happy 2025-11-30 00:43:33 +08:00
pre-commit-ci[bot]
aa9387c53a chore(linter): auto fix by pre-commit hooks 2025-11-25 03:09:02 +00:00
咕谷酱
db430db01b fix(fetcher): handle token timeout gracefully 2025-11-25 11:08:51 +08:00
MingxuanGame
7b34bd8b0b feat(auth): add created_at and updated_at in OAuthToken
resolve #78
2025-11-23 13:56:28 +00:00
MingxuanGame
e049056534 fix(router): add 'user_preferences' for /me API 2025-11-23 13:45:48 +00:00
MingxuanGame
819f52450c refactor(fetcher): implement passive rate limiter for API requests 2025-11-23 13:42:21 +00:00
MingxuanGame
40da994ae8 refactor(database): use a new 'On-Demand' design (#86)
Technical Details: https://blog.mxgame.top/2025/11/22/An-On-Demand-Design-Within-SQLModel/
2025-11-23 21:41:02 +08:00
MingxuanGame
7063f409b1 chore(mods): update default ranked mods
Make AL & SG ranked

https://osu.ppy.sh/home/changelog/tachyon/2025.1121.0
2025-11-23 03:01:21 +00:00
MingxuanGame
4b942e3cb3 chore(matchmaking): sync with upstream 2025-11-22 13:15:24 +00:00
MingxuanGame
b37300220a feat(statistics): change ranked_score field to BigInt in UserStatistics model 2025-11-09 04:19:10 +00:00
MingxuanGame
ec8bb02935 chore(linter): remove unnecessary blank line in BeatmapRawFetcher class 2025-11-09 04:04:17 +00:00
MingxuanGame
3a00ca9b91 fix(fetcher): fix unretieved exceptions 2025-11-09 09:37:59 +08:00
MingxuanGame
2bd770a995 fix(user): fix missing greenlet when invalidating cache 2025-11-09 09:35:21 +08:00
MingxuanGame
27f345cb75 feat(fetcher): replace HTTPError with NoBeatmapError for better error handling 2025-11-08 20:03:25 +00:00
MingxuanGame
05540d44d0 feat(fetcher): optimize the process of getting beatmap raw to boost recalculate 2025-11-08 19:42:47 +00:00
MingxuanGame
a46b17fce4 feat(recalculate): add --additional-count & --max-cached-beatmaps-count to batch calculate 2025-11-08 18:31:00 +00:00
MingxuanGame
5c2687e1e4 feat(cache): add user cache invalidation for avatar, cover, and beatmapset updates 2025-11-08 18:14:51 +00:00
MingxuanGame
0be3e903d4 feat(performance-point): switch performance calculator to performance-server (#80)
* feat(config): make `performance_server` as default calculator

* deploy(docker): use osu-performance-server

* docs(readme): add ruleset download instructions

* chore(dev): update development environment

* feat(dev): update development environment setup and service startup order

* fix(deps): move `rosu-pp-py` to `project.optional-dependencies`

* feat(beatmap): handle deleted beatmaps

* feat(performance-server): add a long timeout for calculation

* feat(recalculate): enhance CLI arguments for performance, leaderboard, and rating recalculations with CSV output support

* fix(recalculate): resolve reviews

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(beatmapsync): resolve too long line

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-09 01:59:09 +08:00
MingxuanGame
293e57aea3 docs(configuration): update spectator-server documents 2025-11-08 13:09:40 +00:00
MingxuanGame
7d6d5696db feat(user): add api /api/v2/me/beatmapset-favourites 2025-11-08 13:02:33 +00:00
Copilot
d9d26d0523 feat(statistics): store ranked_score & total_score under classic scoring mode (#68)
* Initial plan

* feat(calculator): add classic score simulator and scoring mode support

- Add ScoringMode enum with STANDARDISED and CLASSIC modes
- Add scoring_mode configuration to game settings
- Implement GetDisplayScore function in calculator.py
- Add get_display_score method to Score model
- Update score statistics to use display scores based on scoring mode

Co-authored-by: MingxuanGame <68982190+MingxuanGame@users.noreply.github.com>

* fix(calculator): apply scoring mode to TotalScoreBestScore delete method

- Update delete method to use display score for consistency
- Ensures all UserStatistics modifications use configured scoring mode

Co-authored-by: MingxuanGame <68982190+MingxuanGame@users.noreply.github.com>

* refactor(calculator): address code review feedback

- Move MAX_SCORE constant to app/const.py
- Implement is_basic() as method in HitResult enum
- Move imports to top of file in Score model
- Revert TotalScoreBestScore storage to use standardised score
- Apply display score calculation in tools/recalculate.py
- Keep display score usage in UserStatistics modifications

Co-authored-by: MingxuanGame <68982190+MingxuanGame@users.noreply.github.com>

* chore(linter): auto fix by pre-commit hooks

* Don't use forward-ref for `ScoringMode`

* chore(linter): auto fix by pre-commit hooks

* fix(calculator): update HitResult usage in get_display_score and adjust ruleset value in PerformanceServerPerformanceCalculator

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MingxuanGame <MingxuanGame@outlook.com>
2025-11-08 20:56:29 +08:00
MingxuanGame
ef3a900de0 chore(custom-ruleset): update custom ruleset definitions (#79) 2025-11-08 19:33:57 +08:00
MingxuanGame
55604621cf chore(custom-ruleset): Update custom ruleset definitions (#64) 2025-11-01 17:12:56 +08:00
MingxuanGame
cf160f1357 feat(user-preference): restrict playmode update to official modes only 2025-10-26 14:18:00 +00:00
MingxuanGame
2519301690 chore(custom-ruleset): Update custom ruleset definitions (#63) 2025-10-26 21:22:17 +08:00
MingxuanGame
33f321952d feat(custom-rulesets): support custom rulesets (#23)
* feat(custom_ruleset): add custom rulesets support

* feat(custom-ruleset): add version check

* feat(custom-ruleset): add LegacyIO API to get ruleset hashes

* feat(pp): add check for rulesets whose pp cannot be calculated

* docs(readme): update README to include support for custom rulesets

* fix(custom-ruleset): make `rulesets` empty instead of throw a error when version check is disabled

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(custom-ruleset): apply the latest changes of generator

c891bcd159

and

e25041ad3b

* feat(calculator): add fallback performance calculation for unsupported modes

* fix(calculator): remove debug print

* fix: resolve reviews

* feat(calculator): add difficulty calculation checks

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-26 21:10:36 +08:00
MingxuanGame
8f4a9d5fed feat(fetcher): use client_credentials grant type to avoid missing refresh token (#62)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-25 20:01:50 +08:00
MingxuanGame
2c81e22749 feat(calculator): support generate PerformanceAttributes & DifficultyAttributes from JSON Schema (#59)
Prepare for custom rulesets.

Schema Genetator: https://github.com/GooGuTeam/custom-rulesets/tree/main/CustomRulesetMetadataGenerator

```bash
dotnet -- schemas path/to/rulesets -o schema.json
```

```bash
python scripts/generate_ruleset_attributes.py schema.json 
```
2025-10-25 19:10:53 +08:00
MingxuanGame
965c96d0b2 feat(config): add docs for matchmaking 2025-10-18 16:08:00 +00:00
咕谷酱
a4dbb9a167 feat(matchmaking): support matchmaking (#48) 2025-10-19 00:05:06 +08:00
MingxuanGame
b180d3f39d fix(config): add missing code-block end 2025-10-18 11:12:53 +00:00
MingxuanGame
8790ccad64 feat(pp-calculator): support other pp calculators (#57)
New configurations:

- CALCULATOR="rosu": specific pp calculator
- CALCULATOR_CONFIG='{}': argument passed through into calculator
2025-10-18 19:10:53 +08:00
MingxuanGame
563a30d28f chore(model): remove empty SignalR files 2025-10-12 17:09:35 +08:00
MingxuanGame
2b78920fed fix(recalculate-job): rename job id for recalculate_failed_beatmap 2025-10-12 16:16:50 +08:00
咕谷酱
a10c07dc57 Align session verification logic with osu-web
Updated session verification method selection to match osu-web's State.php:36 logic, using SUPPORT_TOTP_VERIFICATION_VER for version checks and prioritizing TOTP when available. Added example environment files for osu-web-master to support local, dusk, and testing setups.
2025-10-12 03:34:38 +08:00
咕谷酱
0e2df8dfef Fix trusted_device flag inversion in session creation
Corrects the logic for the trusted_device parameter when creating login sessions by inverting its value. This ensures that the session accurately reflects whether the device is trusted or not.
2025-10-12 03:17:56 +08:00
咕谷酱
73d25c7604 Add Cloudflare Turnstile verification to auth flows
Introduces Cloudflare Turnstile verification for registration, OAuth password grant, and password reset endpoints (excluding osu! client). Adds related configuration options and a new service for token validation. Also refactors password change logic to support TOTP or password-based verification, improving security for users with TOTP enabled.
2025-10-12 02:39:46 +08:00
咕谷酱
301130df02 Refactor SMTP config usage in EmailQueue
Move SMTP configuration retrieval from class initialization to method scope in send_email_by_smtp. This improves encapsulation and ensures the latest settings are used when sending emails.
2025-10-12 00:47:18 +08:00
咕谷酱
6731373ded Add MailerSend and template-based email verification
Introduced support for MailerSend as an email provider alongside SMTP, with configuration options in settings. Added Jinja2-based multi-language email templates for verification emails, and refactored the email sending logic to use these templates and support language selection based on user country code. Updated related services and API endpoints to pass country code and handle new response formats. Added dependencies for Jinja2 and MailerSend.
2025-10-12 00:36:47 +08:00