diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-03-07 03:23:05 -0800 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-03-07 03:23:05 -0800 |
| commit | 63a4307cae510c462b40ebba89107a5b63c72b71 (patch) | |
| tree | e262c1faae12ec2bc2a36f37ffda15e0e2ed62c5 | |
| parent | 8a2a8070f901f08847c71a84b5578cfe0de4768a (diff) | |
add error handling for unhandled levels
| -rw-r--r-- | chuni/aquadx/chuni_aquadx_to_tachi.py | 3 | ||||
| -rw-r--r-- | mai2/aquadx/mai_aquadx_to_tachi.py | 3 | ||||
| -rw-r--r-- | ongeki/aquadx/ongeki_aquadx_to_tachi.py | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/chuni/aquadx/chuni_aquadx_to_tachi.py b/chuni/aquadx/chuni_aquadx_to_tachi.py index 4063ac2..36981f5 100644 --- a/chuni/aquadx/chuni_aquadx_to_tachi.py +++ b/chuni/aquadx/chuni_aquadx_to_tachi.py @@ -25,6 +25,9 @@ def convert_chuni_aquadx_json_to_tachi_json(input_json: str, output_file: str, s if "userPlaylogList" in raw_data: for entry in raw_data["userPlaylogList"]: level = entry.get("level", 0) + if level not in DIFFICULTY_MAPPING.keys(): + skipped_count += 1 + continue # Skip World's End, Unsupported by Tachi if level == 5 or level not in DIFFICULTY_MAPPING: diff --git a/mai2/aquadx/mai_aquadx_to_tachi.py b/mai2/aquadx/mai_aquadx_to_tachi.py index 475d837..cdbad4e 100644 --- a/mai2/aquadx/mai_aquadx_to_tachi.py +++ b/mai2/aquadx/mai_aquadx_to_tachi.py @@ -39,6 +39,9 @@ def convert_chuni_aquadx_json_to_tachi_json(input_json: str, output_file: str, s if "userPlaylogList" in raw_data: for entry in raw_data["userPlaylogList"]: level = entry.get("level", 0) + if level not in DIFFICULTY_MAPPING.keys(): + skipped_count += 1 + continue processed_count += 1 song_title = music_json[str(entry["musicId"])]["name"] diff --git a/ongeki/aquadx/ongeki_aquadx_to_tachi.py b/ongeki/aquadx/ongeki_aquadx_to_tachi.py index 0319526..8feee7f 100644 --- a/ongeki/aquadx/ongeki_aquadx_to_tachi.py +++ b/ongeki/aquadx/ongeki_aquadx_to_tachi.py @@ -39,6 +39,9 @@ def convert_chuni_aquadx_json_to_tachi_json(input_json: str, output_file: str, s if "recent" in raw_data: for entry in raw_data["recent"]: level = entry.get("level", 0) + if level not in DIFFICULTY_MAPPING.keys(): + skipped_count += 1 + continue processed_count += 1 try: |
