add chart mix renders to export and fix url
This commit is contained in:
parent
84ff7e74b6
commit
cfe7c134a0
@ -37,6 +37,9 @@ def main():
|
|||||||
chart_path = chart.image_path
|
chart_path = chart.image_path
|
||||||
target_path = chart_dir / f'{chart_path.stem}_{chart_hash}{chart_path.suffix}'
|
target_path = chart_dir / f'{chart_path.stem}_{chart_hash}{chart_path.suffix}'
|
||||||
shutil.copy(chart_path, target_path)
|
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:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -311,10 +311,12 @@ class Music(commands.Cog):
|
|||||||
|
|
||||||
for difficulty in [ChartDifficulty.Easy, ChartDifficulty.Normal, ChartDifficulty.Hard, ChartDifficulty.Expert]:
|
for difficulty in [ChartDifficulty.Easy, ChartDifficulty.Normal, ChartDifficulty.Hard, ChartDifficulty.Expert]:
|
||||||
chart: ChartMaster = song.charts[difficulty]
|
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 = discord.Embed(title=f'Mix: {song.name} [{chart.difficulty.name}]')
|
||||||
embed.set_thumbnail(url=f'attachment://jacket.png')
|
embed.set_thumbnail(url=f'attachment://jacket.png')
|
||||||
embed.set_image(
|
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
|
note_counts = chart.note_counts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user