fixxes to soundboard
This commit is contained in:
+7
-3
@@ -78,9 +78,13 @@ def control_page():
|
||||
|
||||
@main_bp.route('/soundboard')
|
||||
def soundboard():
|
||||
if state.current_config is None or 'sounds' not in state.current_config:
|
||||
if state.current_config is None:
|
||||
return redirect(url_for('main.index'))
|
||||
|
||||
sounds = state.current_config.get('sounds', [])
|
||||
return render_template('soundboard.html', sounds=sounds, config=state.current_config)
|
||||
sounds_local = state.current_config.get('sounds', [])
|
||||
sounds_global = load_default_sounds(current_app.config['CONFIG_DIR'])
|
||||
return render_template('soundboard.html',
|
||||
sounds_local=sounds_local,
|
||||
sounds_global=sounds_global,
|
||||
config=state.current_config)
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user