Merge pull request #102 from janspeller/bugfix/ISSUE-101-InputSources_Multimon

Issue #101: Restart multimon on broken input
This commit is contained in:
Bastian Schroll 2023-01-24 11:46:22 +01:00 committed by GitHub
commit 1b95474bc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -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()

View file

@ -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()