]> git.0d.be Git - django-panik-nonstop.git/commitdiff
switch-jack: do not log on regular updates
authorFrédéric Péters <fpeters@0d.be>
Wed, 17 Apr 2024 10:03:58 +0000 (12:03 +0200)
committerFrédéric Péters <fpeters@0d.be>
Wed, 17 Apr 2024 10:03:58 +0000 (12:03 +0200)
nonstop/management/commands/switch-jack.py

index fbb8637d7f760ec98bb744f213f351858d7391bf..83580b1dbb832f0fb508e5c9fe0c5b84b05b478d 100644 (file)
@@ -51,6 +51,7 @@ class Command(BaseCommand):
                                     continue
                                 if msg.get('active') != self.currently_active:
                                     self.currently_active = msg.get('active')
+                                    logger.info('setting source: %s', active)
                                     self.update_jack_connections(self.currently_active)
                             elif msg.type == aiohttp.WSMsgType.ERROR:
                                 break
@@ -67,7 +68,6 @@ class Command(BaseCommand):
         if active not in app_settings.SWITCH_IN_PORTS:
             logger.info('unsupported source: %s', active)
             return
-        logger.info('setting source: %s', active)
         out_ports = app_settings.SWITCH_OUT_PORTS
         with jack.Client('switch-jack') as client:
             known_ports = {x.name for x in client.get_ports(is_audio=True)}