added themes to soundboard

This commit is contained in:
2026-02-18 22:04:02 +01:00
parent 5f9920f096
commit 21c0b13b8d
17 changed files with 320 additions and 142 deletions
+4 -9
View File
@@ -4,7 +4,7 @@ import logging
import json
from flask import Blueprint, render_template, redirect, url_for, request, jsonify, send_from_directory, current_app
from app.utils.helpers import load_configs, load_default_sounds
from app.utils.helpers import load_configs, load_default_sounds, load_soundboard_configs
import app.state as state
from config import Config
@@ -78,13 +78,8 @@ def control_page():
@main_bp.route('/soundboard')
def soundboard():
if state.current_config is None:
return redirect(url_for('main.index'))
sounds_local = state.current_config.get('sounds', [])
sounds_global = load_default_sounds(current_app.config['CONFIG_DIR'])
# Soundboard ist bewusst unabhängig vom Hub; es werden Sound-Themen geladen
sb_configs = load_soundboard_configs(current_app.config['SOUNDBOARD_CONFIG_DIR'])
return render_template('soundboard.html',
sounds_local=sounds_local,
sounds_global=sounds_global,
config=state.current_config)
soundboard_configs=sb_configs)
pass