diff --git a/.gitignore b/.gitignore index 19fac71..12ef074 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,11 @@ ### Custom # New data directories -exports/ - content/**/** !content/.gitkeep -bereal/static/videos/** -!bereal/static/videos/.gitkeep - -# Data directories the original project -combined/ -primary/ -secondary/ -song.wav +exports/**/** +!exports/.gitkeep ### React.gitignore diff --git a/bereal/server.py b/bereal/server.py index 96b1fed..31f3b46 100644 --- a/bereal/server.py +++ b/bereal/server.py @@ -122,18 +122,17 @@ def create_video() -> tuple[Response, int]: year = request.form["year"] sdate, edate = year2dates(year) - wav_file = request.files["file"] + wav_file = request.files.get("file", None) mode_str = request.form.get("mode") mode = str2mode(mode_str) - logger.debug("Downloading music file %s...", wav_file.filename) - song_folder = os.path.join(CONTENT_PATH, phone, year) os.makedirs(song_folder, exist_ok=True) song_path = os.path.join(song_folder, "song.wav") if wav_file: + logger.debug("Downloading music file %s...", wav_file.filename) try: wav_file.save(song_path) except Exception as error: diff --git a/bereal/static/images/endCard.jpg b/bereal/static/images/endCard.jpg index ef5f13b..881a05f 100644 Binary files a/bereal/static/images/endCard.jpg and b/bereal/static/images/endCard.jpg differ diff --git a/exports/.gitkeep b/exports/.gitkeep new file mode 100644 index 0000000..e69de29