From 02d25f8cd94b7287c09f50564aeb6c2e9d885b4b Mon Sep 17 00:00:00 2001 From: Jaka Date: Sun, 28 Nov 2021 00:45:25 +0100 Subject: [PATCH] Added walkman placeholder --- deploy.py | 14 ++++- source/sunken_tapes_template.xml | 92 ++++++++++++++++++++++++++++++-- 2 files changed, 101 insertions(+), 5 deletions(-) diff --git a/deploy.py b/deploy.py index ce435a0..b2112d3 100644 --- a/deploy.py +++ b/deploy.py @@ -127,6 +127,18 @@ def fetch_and_cut_song(tape, ffmpeg_version): "or download the latest release version manually.") sys.exit() + walkman = ["./utils/ffmpeg-" + ffmpeg_version + "-full_build/bin/ffmpeg.exe", + "-i", f"./build/music/{tape['identifier']}.ogg", + "-af", f"highpass=f=300,lowpass=f=12000", + f"./build/music/{tape['identifier']}-walkman.ogg"] + + try: + subprocess.call(walkman) + except FileNotFoundError: + print("ffmpeg not in utils directory. Run python install_dependencies.py " + "or download the latest release version manually.") + sys.exit() + def assemble_png_image(tapes, icons=False): if icons: @@ -167,7 +179,7 @@ def prepare_music(data): logging.info("downloading and cutting the songs") for i, tape in enumerate(data): - if not os.path.exists(f"./build/music/{tape['identifier']}.ogg"): + if not (os.path.exists(f"./build/music/{tape['identifier']}.ogg") or os.path.exists(f"./build/music/{tape['identifier']}-walkman.ogg")): logging.info(f"{i + 1}/{len(data)} Downloading: {tape['name']}") fetch_and_cut_song(tape, ffmpeg_version) else: diff --git a/source/sunken_tapes_template.xml b/source/sunken_tapes_template.xml index eaeec9c..796d421 100644 --- a/source/sunken_tapes_template.xml +++ b/source/sunken_tapes_template.xml @@ -1,7 +1,7 @@ {% if config['slug'] != "sunken_tapes" %}{% else %}{% endif %} - + @@ -54,7 +54,71 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for tape in tapes %} + + + + {% endfor %} + + + + + + + + + @@ -112,7 +176,7 @@ - + @@ -125,7 +189,7 @@ - + @@ -165,6 +229,26 @@ + + + + + + + + {% if tape.buffs %} + {% for buff in tape.buffs %} + {% if buff == "psychosis" %}{% else %}{% endif %}{% endfor %} + {% endif %} + + + + + + + + + {% endfor %} \ No newline at end of file