From f3f72b3022429162336b3414638e6aa3da64c946 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 29 Jun 2024 17:32:37 +0200 Subject: [PATCH] Don't play empty audio segments --- sbapp/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbapp/main.py b/sbapp/main.py index b3f52ac..a52a0a1 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -1612,7 +1612,11 @@ class SidebandApp(MDApp): temp_path = None if self.last_msg_audio != audio_field[1]: RNS.log("Reloading audio source", RNS.LOG_DEBUG) - self.last_msg_audio = audio_field[1] + if len(audio_field[1]) > 10: + self.last_msg_audio = audio_field[1] + else: + self.last_msg_audio = None + return if audio_field[0] == LXMF.AM_OPUS_OGG: temp_path = self.sideband.rec_cache+"/msg.ogg"