From 19169c492539ca35c27aacc0514c926563b82cf7 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 23 Dec 2019 15:41:10 -0600 Subject: [PATCH] quick fix for a lack of filenames.json for new production server --- app/sound.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/sound.py b/app/sound.py index 47de89c..2853327 100644 --- a/app/sound.py +++ b/app/sound.py @@ -72,6 +72,10 @@ service_functions = { 'soundcloud' : {'url' : None, 'path' : None} } +if not os.path.exists(os.path.join('app', 'sounds', 'filenames.json')): + with open(os.path.join('app', 'sounds', 'filenames.json'), 'r+') as file: + json.dump({'youtube' : {} }) + # Streams a prepared MP3 back to the client @app.route('/stream//') def stream(service, mediaid):