Skip to content

Commit a62d816

Browse files
committed
Merge pull request 'fix first startup problems' (#3) from release_defects into main
Reviewed-on: http://10.10.1.170:30008/buggex/streamcontroller_soundboard/pulls/3
2 parents abb96b7 + 768fdaf commit a62d816

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

main.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,22 @@ def __init__(self):
5050
# Assume this is first time, set the first device found
5151
devices = self.backend.get_audio_devices()
5252
if len(devices) > 0:
53-
settings[Consts.SETTING_DEVICE] = devices[0]
53+
device = devices[0]
54+
settings[Consts.SETTING_DEVICE] = device
5455
self.set_settings(settings)
56+
self.backend.set_device(device)
5557
else:
5658
log.error("Failed to find a sound device!")
5759

5860
selected_player = settings.get(Consts.SETTING_PLAYER)
5961
if selected_player is not None:
6062
self.backend.set_player(selected_player)
63+
else:
64+
# Assume this is first time, set the default player
65+
default_player = list(Consts.PLAYER_NAMES.keys())[0]
66+
settings[Consts.SETTING_PLAYER] = default_player
67+
self.set_settings(settings)
68+
self.backend.set_player(default_player)
6169

6270
## Register actions
6371
self.play_action_holder = ActionHolder(

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.1.0",
2+
"version": "1.1.1",
33
"thumbnail": "assets/Thumbnail.png",
44
"id": "com_buggex_soundboard",
55
"name": "Soundboard",

0 commit comments

Comments
 (0)