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