Skip to content

Commit

Permalink
Better check
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Jun 22, 2024
1 parent 771286d commit 40c00fc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/adapters/beatmap_mirrors/mirror_aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,7 @@ async def fetch_beatmap_zip_data(beatmapset_id: int) -> bytes | TimedOut | None:
"beatmapset_id": beatmapset_id,
"ms_elapsed": ms_elapsed,
"data_size": len(result),
"bad_data": (
result
if len(result) < (20000 if mirror.name == "mino" else 500)
else None
),
"bad_data": result if not result.startswith(b"PK\x03\x04") else None,
},
)
return result

0 comments on commit 40c00fc

Please sign in to comment.