fix(statistics): add length of beatmap to PT instead of ended_at - started_at

This commit is contained in:
MingxuanGame
2025-08-10 15:42:58 +00:00
parent 32e2ac5704
commit a4e095c9ea
2 changed files with 4 additions and 3 deletions

View File

@@ -509,7 +509,7 @@ async def get_user_best_pp(
async def process_user(
session: AsyncSession, user: User, score: Score, ranked: bool = False
session: AsyncSession, user: User, score: Score, length: int, ranked: bool = False
):
assert user.id
assert score.id
@@ -613,7 +613,7 @@ async def process_user(
)
statistics.play_count += 1
mouthly_playcount.playcount += 1
statistics.play_time += int((score.ended_at - score.started_at).total_seconds())
statistics.play_time += length
statistics.count_100 += score.n100 + score.nkatu
statistics.count_300 += score.n300 + score.ngeki
statistics.count_50 += score.n50