add chart mix renders to export and fix url

pull/1/head
qwewqa 4 years ago
parent 84ff7e74b6
commit cfe7c134a0
  1. 3
      export_assets.py
  2. 4
      miyu_bot/commands/cogs/music.py

@ -37,6 +37,9 @@ def main():
chart_path = chart.image_path
target_path = chart_dir / f'{chart_path.stem}_{chart_hash}{chart_path.suffix}'
shutil.copy(chart_path, target_path)
mix_path = chart.mix_path
target_path = chart_dir / f'{mix_path.stem}_{chart_hash}{mix_path.suffix}'
shutil.copy(mix_path, target_path)
except FileNotFoundError:
pass

@ -311,10 +311,12 @@ class Music(commands.Cog):
for difficulty in [ChartDifficulty.Easy, ChartDifficulty.Normal, ChartDifficulty.Hard, ChartDifficulty.Expert]:
chart: ChartMaster = song.charts[difficulty]
chart_hash = hash_master(chart)
mix_path = chart.mix_path
embed = discord.Embed(title=f'Mix: {song.name} [{chart.difficulty.name}]')
embed.set_thumbnail(url=f'attachment://jacket.png')
embed.set_image(
url=f'https://qwewqa.github.io/d4dj-dumps/{chart.mix_path.relative_to(asset_manager.path).as_posix()}'
url=f'https://qwewqa.github.io/d4dj-dumps/music/charts/{mix_path.stem}_{chart_hash}{mix_path.suffix}'
)
note_counts = chart.note_counts

Loading…
Cancel
Save