From dbf552f68079703fa8d0e8b895b144456e5c374f Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Wed, 19 Oct 2022 11:40:19 +0000 Subject: [PATCH 1/4] Restart multimon on broken input --- boswatch/inputSource/lineInInput.py | 5 +++++ boswatch/inputSource/pulseaudioInput.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/boswatch/inputSource/lineInInput.py b/boswatch/inputSource/lineInInput.py index 5556d4c..b6b182d 100644 --- a/boswatch/inputSource/lineInInput.py +++ b/boswatch/inputSource/lineInInput.py @@ -48,6 +48,11 @@ class LineInInput(InputBase): if not lineInProc.isRunning: logging.warning("asla was down - try to restart") lineInProc.start() + + if lineInProc.isRunning: + logging.info("rtl_fm is back up - restarting multimon...") + mmProc.setStdin(lineInProc.stdout) + mmProc.start() elif not mmProc.isRunning: logging.warning("multimon was down - try to restart") mmProc.start() diff --git a/boswatch/inputSource/pulseaudioInput.py b/boswatch/inputSource/pulseaudioInput.py index 3b9b42d..7f35667 100644 --- a/boswatch/inputSource/pulseaudioInput.py +++ b/boswatch/inputSource/pulseaudioInput.py @@ -47,6 +47,11 @@ class PulseAudioInput(InputBase): if not PulseAudioProc.isRunning: logging.warning("PulseAudio was down - try to restart") PulseAudioProc.start() + + if PulseAudioProc.isRunning: + logging.info("rtl_fm is back up - restarting multimon...") + mmProc.setStdin(PulseAudioProc.stdout) + mmProc.start() elif not mmProc.isRunning: logging.warning("multimon was down - try to restart") mmProc.start() From c5c45e39d90c8539536fe9c7b65429a67f4071a3 Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Mon, 23 Jan 2023 14:22:08 +0100 Subject: [PATCH 2/4] Fix Method calll to asyncRequests after function was made Private --- plugin/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/http.py b/plugin/http.py index 1af3035..fa14036 100644 --- a/plugin/http.py +++ b/plugin/http.py @@ -72,7 +72,7 @@ class BoswatchPlugin(PluginBase): loop = asyncio.get_event_loop() - future = asyncio.ensure_future(self.asyncRequests(urls)) + future = asyncio.ensure_future(self._asyncRequests(urls)) loop.run_until_complete(future) async def _asyncRequests(self, urls): From aef8d6f46d3b3fc70bfec731ae3d2febba0fd1ee Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Mon, 23 Jan 2023 14:22:25 +0000 Subject: [PATCH 3/4] Limit flake8 to 4.0.1 to fix tests --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 5e215ff..0cca07d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ mkdocs # for develope only pytest pytest-cov +flake8==4.0.1 pytest-flake8 pytest-flakes pytest-randomly From b43f71874f53ae76ca9bbfe431f9085fd16ec218 Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Tue, 24 Jan 2023 10:22:46 +0100 Subject: [PATCH 4/4] Remove Whitespace --- boswatch/inputSource/pulseaudioInput.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boswatch/inputSource/pulseaudioInput.py b/boswatch/inputSource/pulseaudioInput.py index 7f35667..7a4c104 100644 --- a/boswatch/inputSource/pulseaudioInput.py +++ b/boswatch/inputSource/pulseaudioInput.py @@ -47,7 +47,7 @@ class PulseAudioInput(InputBase): if not PulseAudioProc.isRunning: logging.warning("PulseAudio was down - try to restart") PulseAudioProc.start() - + if PulseAudioProc.isRunning: logging.info("rtl_fm is back up - restarting multimon...") mmProc.setStdin(PulseAudioProc.stdout)