parent
09dcba90a9
commit
80687df82e
@ -77,9 +77,9 @@ class Config(object):
|
||||
OBS_PASSWORD = "auster"
|
||||
OBS_PORT = 4455
|
||||
PLAY_SETTLE = 500000
|
||||
RETURN_KEY_DEBOUNCE_MS = 500
|
||||
ROOT = os.environ.get("ROOT") or "/home/kae/music"
|
||||
ROWS_FROM_ZERO = True
|
||||
IMPORT_DESTINATION = os.path.join(ROOT, "Singles")
|
||||
SCROLL_TOP_MARGIN = 3
|
||||
START_GAP_WARNING_THRESHOLD = 300
|
||||
TEXT_NO_TRACK_NO_NOTE = "[Section header]"
|
||||
@ -90,3 +90,6 @@ class Config(object):
|
||||
WARNING_MS_BEFORE_FADE = 5500
|
||||
WARNING_MS_BEFORE_SILENCE = 5500
|
||||
WEB_ZOOM_FACTOR = 1.2
|
||||
|
||||
# These rely on earlier definitions
|
||||
IMPORT_DESTINATION = os.path.join(ROOT, "Singles")
|
||||
|
||||
@ -214,8 +214,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
try:
|
||||
mixer.init()
|
||||
except Exception:
|
||||
helpers.show_warning(self, "Fatal error",
|
||||
"Cannot initialise sound device")
|
||||
helpers.show_warning(self, "Fatal error", "Cannot initialise sound device")
|
||||
sys.exit(1)
|
||||
|
||||
self.widgetFadeVolume.hideAxis("bottom")
|
||||
@ -654,7 +653,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
else:
|
||||
log.error("Failed to retrieve playlist")
|
||||
|
||||
|
||||
def download_played_tracks(self) -> None:
|
||||
"""Download a CSV of played tracks"""
|
||||
|
||||
@ -1098,6 +1096,13 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
|
||||
# Check for inadvertent press of 'return'
|
||||
if self.catch_return_key:
|
||||
# Suppress inadvertent double press
|
||||
if (
|
||||
track_sequence.now.start_time and track_sequence.now.start_time
|
||||
+ dt.timedelta(milliseconds=Config.RETURN_KEY_DEBOUNCE_MS)
|
||||
> dt.datetime.now()
|
||||
):
|
||||
return
|
||||
if not helpers.ask_yes_no(
|
||||
"Track playing",
|
||||
"Really play next track now?",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user