Skip to content

Commit

Permalink
fix: StoryPartAuto bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
sctop committed Jun 3, 2024
1 parent 3f95863 commit 9e7c1a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data
Submodule data updated 1557 files
8 changes: 6 additions & 2 deletions data_model/actual_data/_story/story_part_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def __init__(self, data, story):
self.data_special = {
"flag": self.data["special"]["flag"],
"track": None if self.data["special"]["track"] == "OST_0" else TrackInfo.get_instance(
self.data["special"]["track"])
self.data["special"]["track"]),
"char": [] if "char" not in self.data["special"].keys() else self.data["special"]["char"]
}

def load(self):
Expand Down Expand Up @@ -209,4 +210,7 @@ def to_json_basic_tracks(self):
# traceback:
# File "F:\GitFile\BA_OST_Index_Parser\data_model\actual_data\story.py", line 355, in to_json
# t["bgm_special"] = self.part.to_json_basic_tracks()
return [self.data_special["track"].to_json_basic()]
try:
return [self.data_special["track"].to_json_basic()]
except Exception:
return []

0 comments on commit 9e7c1a0

Please sign in to comment.