mirror of
https://github.com/283375/arcaea-offline.git
synced 2025-04-09 17:40:17 +00:00
impr(external): St3ScoreParser
improvements
This commit is contained in:
parent
13ea4d9e97
commit
a9f8ba6e22
9
src/arcaea_offline/external/arcaea/st3.py
vendored
9
src/arcaea_offline/external/arcaea/st3.py
vendored
@ -6,7 +6,7 @@ from sqlalchemy import select
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from ...models.scores import Score
|
||||
from .common import ArcaeaParser
|
||||
from .common import ArcaeaParser, fix_timestamp
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -37,9 +37,6 @@ class St3ScoreParser(ArcaeaParser):
|
||||
(song_id, rating_class),
|
||||
).fetchone()[0]
|
||||
|
||||
date_str = str(date)
|
||||
date = None if len(date_str) < 7 else int(date_str.ljust(10, "0"))
|
||||
|
||||
items.append(
|
||||
Score(
|
||||
song_id=song_id,
|
||||
@ -48,10 +45,10 @@ class St3ScoreParser(ArcaeaParser):
|
||||
pure=pure,
|
||||
far=far,
|
||||
lost=lost,
|
||||
date=date,
|
||||
date=fix_timestamp(date),
|
||||
modifier=modifier,
|
||||
clear_type=clear_type,
|
||||
comment="Imported from st3",
|
||||
comment=f"Parsed from st3",
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user