120 lines
2.9 KiB
Python
120 lines
2.9 KiB
Python
"""
|
|
Copyright (C) 2025 283375
|
|
|
|
This file is part of "arcaea-apk-assets" (stated as "this program" below).
|
|
|
|
This program is free software: you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free Software
|
|
Foundation, either version 3 of the License, or (at your option) any later
|
|
version.
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
this program. If not, see <https://www.gnu.org/licenses/>.
|
|
"""
|
|
|
|
from dataclasses import dataclass
|
|
from datetime import datetime
|
|
from decimal import Decimal
|
|
from typing import Optional
|
|
|
|
ARCAEA_LANGUAGE_KEYS = ["ja", "ko", "zh-Hans", "zh-Hant"]
|
|
|
|
|
|
@dataclass
|
|
class Pack:
|
|
id: str
|
|
name: Optional[str] = None
|
|
description: Optional[str] = None
|
|
section: Optional[str] = None
|
|
plus_character: Optional[int] = None
|
|
append_parent_id: Optional[str] = None
|
|
is_world_extend: bool = False
|
|
|
|
@property
|
|
def is_append(self):
|
|
return self.append_parent_id is not None
|
|
|
|
|
|
@dataclass
|
|
class PackLocalization:
|
|
id: str
|
|
lang: str
|
|
name: Optional[str]
|
|
description: Optional[str]
|
|
|
|
|
|
@dataclass
|
|
class Song:
|
|
pack_id: str
|
|
id: str
|
|
added_at: datetime
|
|
|
|
idx: Optional[int] = None
|
|
title: Optional[str] = None
|
|
artist: Optional[str] = None
|
|
is_deleted: bool = False
|
|
|
|
version: Optional[str] = None
|
|
|
|
bpm: Optional[str] = None
|
|
bpm_base: Optional[Decimal] = None
|
|
is_remote: bool = False
|
|
is_unlockable_in_world: bool = False
|
|
is_beyond_unlock_state_local: bool = False
|
|
purchase: Optional[str] = None
|
|
category: Optional[str] = None
|
|
|
|
side: Optional[int] = None
|
|
bg: Optional[str] = None
|
|
bg_inverse: Optional[str] = None
|
|
bg_day: Optional[str] = None
|
|
bg_night: Optional[str] = None
|
|
|
|
source: Optional[str] = None
|
|
source_copyright: Optional[str] = None
|
|
|
|
|
|
@dataclass
|
|
class SongLocalization:
|
|
id: str
|
|
lang: str
|
|
title: Optional[str] = None
|
|
source: Optional[str] = None
|
|
has_jacket: bool = False
|
|
|
|
|
|
@dataclass
|
|
class Difficulty:
|
|
song_id: str
|
|
rating_class: int
|
|
|
|
rating: int
|
|
is_rating_plus: bool = False
|
|
|
|
chart_designer: Optional[str] = None
|
|
jacket_designer: Optional[str] = None
|
|
|
|
has_overriding_audio: bool = False
|
|
has_overriding_jacket: bool = False
|
|
jacket_night: Optional[str] = None
|
|
|
|
added_at: Optional[datetime] = None
|
|
bg: Optional[str] = None
|
|
version: Optional[str] = None
|
|
title: Optional[str] = None
|
|
artist: Optional[str] = None
|
|
is_legacy11: bool = False
|
|
|
|
|
|
@dataclass
|
|
class DifficultyLocalization:
|
|
song_id: str
|
|
rating_class: int
|
|
lang: str
|
|
title: Optional[str]
|
|
artist: Optional[str]
|