Return hit_count from circleguard service

This commit is contained in:
Stedoss 2025-04-06 04:01:35 +01:00
parent 35a9e9a00e
commit 5caa9ca14b
2 changed files with 5 additions and 2 deletions

View File

@ -61,7 +61,8 @@ class CircleguardService {
val sliderend_release_standard_deviation: Double?,
val sliderend_release_standard_deviation_adjusted: Double?,
val judgements: List<Judgement>
val judgements: List<Judgement>,
val hit_count: Int?,
)
fun postProcessReplay(replayResponse: ReplayResponse, mods: Int = 0) {

View File

@ -102,6 +102,7 @@ class ReplayResponse:
sliderend_release_standard_deviation_adjusted: float
judgements: List[Hit]
hit_count: int
def to_dict(self):
d = asdict(self)
@ -217,7 +218,8 @@ async def process_replay(request: Request):
sliderend_release_standard_deviation=np.std(se, ddof=1),
sliderend_release_standard_deviation_adjusted=np.std(my_filter_outliers(se), ddof=1),
judgements=judgements
judgements=judgements,
hit_count=len(hits)
)
return json(ur_response.to_dict())