quick fix for a lack of filenames.json for new production server

This commit is contained in:
Xevion
2019-12-23 15:41:10 -06:00
parent d788c3c915
commit 19169c4925

View File

@@ -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/<service>/<mediaid>')
def stream(service, mediaid):