musicmuster/app/config.py
Keith Edmunds e498457395 Add option to force DEBUG message to stderr
If the default log level for stderr is greater than DEBUG, DEBUG
message won't be shown. The DEBUG(msg) function now takes an optional
Boolean second parameter. If that is True, the DEBUG message is always
sent to stderr.
2021-06-06 10:50:40 +01:00

41 lines
1.2 KiB
Python

import logging
import os
class Config(object):
AUDIO_SEGMENT_CHUNK_SIZE = 10
COLOUR_CURRENT_HEADER = "#d4edda"
COLOUR_CURRENT_PLAYLIST = "#28a745"
COLOUR_ODD_PLAYLIST = "#f2f2f2"
COLOUR_ENDING_TIMER = "#dc3545"
COLOUR_EVEN_PLAYLIST = "#d9d9d9"
COLOUR_NEXT_HEADER = "#fff3cd"
COLOUR_NEXT_PLAYLIST = "#ffc107"
COLOUR_NOTES_PLAYLIST = "#b8daff"
COLOUR_PREVIOUS_HEADER = "#f8d7da"
COLOUR_WARNING_TIMER = "#ffc107"
DBFS_FADE = -12
DBFS_SILENCE = -50
DISPLAY_SQL = False
ERRORS_TO = ['kae@midnighthax.com']
FADE_STEPS = 20
FADE_TIME = 3000
LOG_LEVEL_STDERR = logging.INFO
LOG_LEVEL_SYSLOG = logging.DEBUG
LOG_NAME = "musicmuster"
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
MAIL_PORT = int(os.environ.get('MAIL_PORT') or 25)
MAIL_SERVER = os.environ.get('MAIL_SERVER') or "woodlands.midnighthax.com"
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
MILLISECOND_SIGFIGS = 0
MYSQL_CONNECT = "mysql+mysqldb://musicmuster:musicmuster@localhost/musicmuster"
NORMALISE_ON_IMPORT = True
ROOT = "/home/kae/music"
TESTMODE = True
TIMER_MS = 500
VOLUME_VLC_DEFAULT = 81
config = Config