fixxes to soundboard

This commit is contained in:
2026-02-17 10:53:01 +01:00
parent db655c381d
commit 5f9920f096
2 changed files with 48 additions and 10 deletions
+7 -3
View File
@@ -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