Compare commits

..
4 Commits
4 changed files with 21 additions and 6 deletions

No files matched your search

+13 -3
View File
@@ -74,16 +74,26 @@ def play_sound():
logging.warning("Configured notification sound is unavailable: %s", sound_path)
return
executable = "afplay" if platform.system() == "Darwin" else shutil.which("ffplay") or shutil.which("mpg123")
executable = "afplay" if platform.system() == "Darwin" else next(
(shutil.which(player) for player in ("ffplay", "mpg123", "mpv", "cvlc", "paplay") if shutil.which(player)),
None,
)
if executable and sound_path:
player = os.path.basename(executable)
cmd = [executable, sound_path]
if executable == "ffplay":
if player == "ffplay":
cmd = [executable, "-nodisp", "-autoexit", sound_path]
elif player == "mpv":
cmd = [executable, "--no-video", sound_path]
elif player == "cvlc":
cmd = [executable, "--play-and-exit", sound_path]
subprocess.run(cmd, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
return
logging.warning("No suitable sound player found for notification sound")
logging.warning(
"No suitable sound player found for notification sound; install ffmpeg (ffplay), mpg123, mpv, or VLC."
)
except subprocess.CalledProcessError as e:
logging.error(f"Sound playback failed: {e}")
+3 -1
View File
@@ -964,7 +964,9 @@ def handle_backtick(stdscr: curses.window) -> None:
settings_menu(
stdscr,
interface,
node=interface.getNode(remote_node_num),
# Settings requests configs explicitly; avoid getNode's
# implicit channel request racing that setup.
node=interface.getNode(remote_node_num, False),
remote=True,
status_callback=lambda message: update_remote_admin_wait(wait_win, message),
)
+4 -1
View File
@@ -326,7 +326,10 @@ def settings_menu(
_request_remote_with_timeout(node.requestConfig, config_type)
if status_callback:
status_callback("Requesting channels…")
_request_remote_with_timeout(node.requestChannels)
node.requestChannels()
if status_callback:
status_callback("Waiting for channel list…")
_request_remote_with_timeout(node.waitForConfig, "channels")
menu = generate_menu_from_protobuf(interface, node=node, include_app_settings=not remote)
menu_state.current_menu = menu["Main Menu"]
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "contact"
version = "1.6.0"
version = "1.6.2"
description = "This Python curses client for Meshtastic is a terminal-based client designed to manage device settings, enable mesh chat communication, and handle configuration backups and restores."
authors = [
{name = "Ben Lipsey",email = "ben@pdxlocations.com"}