Skip to content

Commit

Permalink
Merge pull request #2 from Rosemoe/etr-fix
Browse files Browse the repository at this point in the history
feat: support Eternal difficulty
  • Loading branch information
zhanbao2000 authored Apr 19, 2024
2 parents a7bc1b0 + 55a2437 commit ecceb38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ArcaeaChartRender/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def _post_processing_song_cover(self):
def _post_processing_song_meta(self):
"""Add song metadata at text area."""
draw = ImageDraw.Draw(self.im)
this_diff = self._song.difficulties[self._difficulty]
this_diff = next(x for x in self._song.difficulties if x.ratingClass == self._difficulty)
# title
draw.text(
xy=(width_cover + margin_bg * 2, self.im.size[1] - height_cover - margin_bg // 2),
Expand Down Expand Up @@ -436,7 +436,7 @@ def _post_processing_song_meta(self):
font=self.theme.font_SourceHanMonoSC_Regular_34,
)
# duration / BPM / base BPM / difficulty / constant
literal_difficulty = ['Past', 'Present', 'Future', 'Beyond'][self._difficulty]
literal_difficulty = ['Past', 'Present', 'Future', 'Beyond', 'Eternal'][self._difficulty]
draw.text(
xy=(self.im.size[0] // 5 * 3, self.im.size[1] - height_cover - margin_bg // 2),
text=dedent(f'''\
Expand Down

0 comments on commit ecceb38

Please sign in to comment.