32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
# config.py – zentral, im Projekt-Root
|
||
|
||
import os
|
||
|
||
class Config:
|
||
SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-key-change-me'
|
||
|
||
# Basisverzeichnis des Projekts (absolut, robust gegen anderes CWD)
|
||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||
|
||
# Alle Pfade absolut auf Basis des Projekt-Roots
|
||
CONFIG_DIR = os.path.join(BASE_DIR, 'configs')
|
||
LOG_DIR = os.path.join(BASE_DIR, 'logs')
|
||
SOUNDS_DIR = os.path.join(BASE_DIR, 'sounds')
|
||
SOUNDBOARD_CONFIG_DIR = os.path.join(BASE_DIR, 'soundboards')
|
||
DEFAULT_THEME_FILE = os.path.join(SOUNDBOARD_CONFIG_DIR, 'default_theme.txt')
|
||
|
||
# Audio-Parameter (für pygame.mixer)
|
||
AUDIO_FREQ = 44100
|
||
AUDIO_SIZE = -16
|
||
AUDIO_CHANNELS = 2
|
||
AUDIO_BUFFER = 2048 # größerer Buffer reduziert Knacksen
|
||
AUDIO_NUM_CHANNELS = 16
|
||
|
||
# Optional: absolute Pfade, falls du später Docker o.ä. nutzt
|
||
# CONFIG_DIR = os.path.join(os.path.dirname(__file__), 'configs')
|
||
|
||
APP_NAME = "MK Sound & Control"
|
||
APP_NAME_SHORT = "MKSC" # für Tab-Titel, wenns kurz sein soll
|
||
APP_VERSION = "0.9.β"
|
||
APP_DESCRIPTION = "Websteuerung für MouldKing MK4/MK6-Hubs mit Soundboard"
|