mirror of
https://github.com/pdxlocations/contact.git
synced 2026-11-01 16:45:46 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ed3cbf370 | ||
|
|
7afc025b9d | ||
|
|
ece37f2a36 | ||
|
|
0cee9777bc |
No files matched your search
@@ -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}")
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
|
||||
@@ -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
@@ -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"}
|
||||
|
||||
Reference in new issue
Block a user