Commit Graph

484 Commits

Author SHA1 Message Date
咕谷酱
7eea68aa9a Update notification.py 2025-08-26 13:18:11 +08:00
pre-commit-ci[bot]
282ae3895e chore(deps): auto fix by pre-commit hooks 2025-08-26 13:18:11 +08:00
咕谷酱
ccfafd9c5f Add fallback for user avatar URL in notifications
Ensures that a default avatar URL is used if the user object lacks an avatar_url attribute or if an exception occurs, improving robustness of notification cover images.
2025-08-26 13:18:11 +08:00
pre-commit-ci[bot]
7625cd99f5 chore(deps): auto fix by pre-commit hooks 2025-08-26 13:18:11 +08:00
咕谷酱
b4fd4e0256 Handle rate limit errors in BeatmapsetFetcher
Introduces RateLimitError to manage 429 responses from the API, updating request_api to raise this error and adding handling in prefetch and warmup logic to skip or log when rate limits are hit. Also improves error handling for authentication failures and token expiration.
2025-08-26 13:18:11 +08:00
咕谷酱
8adc88bf00 Remove retry logic from BaseFetcher API requests
Simplified the BaseFetcher class by removing the max_retries parameter and all related retry and reauthorization logic. API requests now fail immediately on authentication errors, and token clearing is handled by a new _clear_tokens method. This change streamlines error handling and reduces complexity.
2025-08-26 13:18:11 +08:00
咕谷酱
d13e5ba5cd Improve async DB handling in chat channel allocation
Replaced db.exec with db.execute for better async compatibility and improved error handling in chat channel queries and allocation. Added immediate commit after channel creation and a fallback mechanism for channel_id allocation in case of database errors.
2025-08-26 13:18:11 +08:00
咕谷酱
ea1a6cd007 Refactor chat channel join/leave logic in room API
Removed redundant safe join/leave channel functions and streamlined chat channel management for room creation, user addition, and removal. Channel operations now use direct server calls with improved error handling and logging, reducing complexity and ensuring main room flows are not interrupted by chat channel errors.
2025-08-26 13:18:11 +08:00
咕谷酱
eae3b44310 Update docker-compose-osurx.yml 2025-08-26 13:18:11 +08:00
咕谷酱
616656638d Improve JWT claims and chat channel reliability
Adds standard JWT claims (audience and issuer) to access tokens and updates config for these fields. Refactors multiplayer room chat channel logic to ensure reliable user join/leave with retry mechanisms, improves error handling and cleanup, and ensures host is correctly added as a participant. Updates Docker entrypoint for better compatibility and connection handling, modifies Docker Compose and Nginx config for improved deployment and proxy header forwarding.
2025-08-26 13:18:11 +08:00
咕谷酱
0cf3061f8a Add nginx and spectator services to docker-compose
Introduced nginx and spectator services to docker-compose-osurx.yml for improved routing and replay handling. Added nginx configuration file to restrict access to /_lio/ paths and proxy requests to spectator and app services. Also refactored environment variable management and removed direct port mapping from the app service.
2025-08-26 13:18:11 +08:00
咕谷酱
71acc7182d Update lio.py 2025-08-26 13:18:11 +08:00
咕谷酱
6fa9d5ba79 修复密码房问题 2025-08-26 13:18:11 +08:00
咕谷酱
35a7bc19da Refactor multiplayer room creation and user removal
Improved error handling in the multiplayer room creation endpoint by restoring try/except blocks for JSON decoding and general exceptions. Updated user removal logic to fetch the full Room object instead of selected columns, simplifying access to room attributes.
2025-08-26 13:18:11 +08:00
咕谷酱
f796c3c1d2 Integrate chat channels with multiplayer rooms
Added logic to create and manage chat channels for multiplayer rooms, ensuring room owners and participants are joined/removed from channels on room events. Improved chat message retrieval to consistently return messages in ascending order, supporting both forward and backward pagination.
2025-08-26 13:18:11 +08:00
咕谷酱
56d6911589 Add multiplayer room event model and channel ID allocation
Introduces the MultiplayerRealtimeRoomEvent SQLModel for tracking real-time room events. Adds an async helper to allocate unique channel IDs for rooms, and updates room creation logic to use this helper for assigning channel IDs automatically.
2025-08-26 13:18:11 +08:00
咕谷酱
fabc1e9e88 Refactor Playlist model and add timestamps migration
Simplifies the PlaylistBase id field to a non-optional int and updates database logic to use session.refresh for id assignment. Adds Alembic migration to include created_at and updated_at columns in room_playlists for timestamp tracking.
2025-08-26 13:18:11 +08:00
咕谷酱
97dcc86d4d Add endpoint to ensure beatmap presence and cache
Introduces a new /beatmaps/ensure API endpoint to verify and cache beatmap metadata and raw files. Updates Playlist model to use auto-incrementing primary key and improves playlist DB insertion logic. Minor formatting and import changes in room and lio modules.
2025-08-26 13:18:11 +08:00
咕谷酱
9043389f25 Pass timestamp as string to signature verification
Changed the call to verify_request_signature to pass the timestamp as a string instead of an integer. This ensures proper signature verification and prevents unauthorized requests.
2025-08-26 13:18:11 +08:00
咕谷酱
c99807dabb 修复房间逻辑 2025-08-26 13:18:11 +08:00
咕谷酱
573a9a52ea Update lio.py 2025-08-26 13:18:11 +08:00
咕谷酱
ea575de250 Add updated_at and created_at to Playlist model
Introduces created_at and updated_at fields to the Playlist model for tracking creation and modification times. Refactors room user removal logic to handle owner transfer and participant count updates more robustly. Updates room query logic for more accurate filtering by category and status. Adds migration stubs for updated_at column in room playlists.
2025-08-26 13:18:11 +08:00
咕谷酱
4c653552a1 Update lio.py 2025-08-26 13:18:11 +08:00
咕谷酱
bec6aa2639 Update lio.py 2025-08-26 13:18:11 +08:00
咕谷酱
403d395ccc Refactor room participant and password handling
Replaces ORM object updates with SQLAlchemy update statements for participant and room records, improving efficiency. Enhances room password verification logic and request body parsing in add_user_to_room, adds debug logging, and simplifies error handling. Removes unused user_data parameter and streamlines participant removal.
2025-08-26 13:18:11 +08:00
咕谷酱
8e6b462645 Refactor multiplayer room endpoints and add logging
Refactored the multiplayer room creation and user management endpoints in lio.py for improved modularity and validation. Added helper functions for user, room, and playlist validation, and enhanced error handling. In auth.py, added logging to output generated JWT tokens for better traceability.
2025-08-26 13:18:11 +08:00
咕谷酱
e0aae80f4b Add password support to multiplayer rooms
Introduces a password field to the Room model and database schema, enabling password-protected multiplayer rooms. Adds LIO router endpoints for room creation, user join/leave, and updates related imports and router registrations.
2025-08-26 13:18:11 +08:00
咕谷酱
5959254de6 Improve Redis key handling and spectator sync logic
Enhances Redis key type checks and cleanup in message system, adds periodic cleanup task, and improves error handling for Redis operations. Refines multiplayer and spectator hub logic to better synchronize player states and prevent invalid spectator sessions. Adds more detailed logging for channel/user join/leave events and spectator watch requests.
2025-08-26 13:18:11 +08:00
MingxuanGame
d4f542c64b chore(score): change pp limit to 3000
没有人类了.
2025-08-25 01:15:34 +08:00
MingxuanGame
3cd6cd81a0 fix(notification): missing greenlet when message is bot command 2025-08-23 15:24:29 +00:00
MingxuanGame
373a2a31f6 fix(signalr): use hub to send packet to trace packet 2025-08-22 17:34:05 +00:00
MingxuanGame
5c57ec63d9 fix(event): remove debug print 2025-08-22 17:28:29 +00:00
MingxuanGame
254a56437d fix(signalr): delete state when cleaning state 2025-08-22 16:59:25 +00:00
咕谷酱
207fc086c0 Merge branch 'main' of https://github.com/GooGuTeam/g0v0-server 2025-08-22 22:03:55 +08:00
咕谷酱
6bcd8c1a21 Add asset proxy feature for resource URLs
Introduces asset proxy configuration and services to enable replacement of osu! resource URLs with custom domains. Updates API endpoints and caching services to process and rewrite resource URLs when asset proxy is enabled. Adds documentation and environment variables for asset proxy setup.
2025-08-22 22:03:51 +08:00
MingxuanGame
2ac56ed3bf fix(daily-challenge): fix duplicated top 10%/50% placements 2025-08-22 13:38:52 +00:00
咕谷酱
1f40c6f70d Update endpoint health check and datetime handling
Added 302 status code as healthy for Sayobot endpoint in BeatmapDownloadService. Improved datetime parsing to use UTC-aware datetimes in EnhancedIntervalStatsManager and removed redundant comments for Redis history trimming.
2025-08-22 20:44:58 +08:00
MingxuanGame
32df7a4ce8 fix(chat): missing greenlet when message is a command 2025-08-22 12:40:22 +00:00
MingxuanGame
9e5b9f023d fix(config,event): remove unused code from 93257f4 2025-08-22 12:01:56 +00:00
咕谷酱
4566ecbab5 Remove admin password reset API router
Deleted the password_reset_admin.py file, which contained admin endpoints for managing password reset status, cleanup, and statistics. This change removes related admin functionality from the API.
2025-08-22 19:57:21 +08:00
咕谷酱
93257f424c Add email sending toggle and fix event timestamp default
Introduces enable_email_sending to control real email delivery in config. Updates Event.created_at to use default_factory for correct timestamp initialization.
2025-08-22 19:54:21 +08:00
MingxuanGame
9b00dbda28 refactor(project): use unified utcnow 2025-08-22 11:27:45 +00:00
MingxuanGame
da66420eaa refactor(recalculate): make it a tool 2025-08-22 11:16:08 +00:00
MingxuanGame
545fc9e0c6 fix(recent_activity): fix rank & achievement event
运行 tools/fix_user_rank_event.py 修复现存的 event
2025-08-22 11:00:36 +00:00
MingxuanGame
e3cbd31312 feat(redirect): add path 2025-08-22 10:18:19 +00:00
MingxuanGame
a0b76bbde3 docs(readme): update readme 2025-08-22 10:06:26 +00:00
MingxuanGame
fdd57c54f7 feat(signalr): add trace log to record packet 2025-08-22 09:41:03 +00:00
MingxuanGame
f23d8298b9 refactor(stats): move to private-api 2025-08-22 09:37:41 +00:00
MingxuanGame
c02aa8941e docs(contributing): add guides & AI agent instructions 2025-08-22 09:37:18 +00:00
MingxuanGame
bff9a87a74 ci(lint): try fix pyright 2025-08-22 08:44:13 +00:00