From 1658321b67eb2ae5352abd98e9017afc08ce0ebc Mon Sep 17 00:00:00 2001 From: oberon Date: Wed, 18 Feb 2026 22:08:26 +0100 Subject: [PATCH] bugfix themes for soundboard --- app/routes/api.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/routes/api.py b/app/routes/api.py index 5fc99ff..9076753 100644 --- a/app/routes/api.py +++ b/app/routes/api.py @@ -282,7 +282,15 @@ def api_play_sound(): # Sounds zusammenstellen: lokalspezifisch + globale Default-Sounds config_sounds = state.current_config.get('sounds', []) if state.current_config else [] global_sounds = load_default_sounds(current_app.config['CONFIG_DIR']) - all_sounds = list(config_sounds) + list(global_sounds) + sb_sounds = [] + if state.current_soundboard: + for key in ('backgrounds', 'sounds', 'random_pool'): + sb_sounds.extend(state.current_soundboard.get(key, [])) + # IDs sicherstellen + for s in sb_sounds: + s.setdefault('id', s.get('file')) + + all_sounds = list(config_sounds) + list(global_sounds) + sb_sounds if not all_sounds: return jsonify({"success": False, "message": "Keine Sounds konfiguriert"}), 400