added themes to soundboard
This commit is contained in:
+4
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user