From 86f98076155793294f2fe77417c32b91c52b55d5 Mon Sep 17 00:00:00 2001 From: flatsiedatsie Date: Wed, 16 Dec 2020 20:48:27 +0100 Subject: [PATCH] 1.0.2 --- pkg/airport.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/pkg/airport.py b/pkg/airport.py index ccf133d..6dc0c0c 100644 --- a/pkg/airport.py +++ b/pkg/airport.py @@ -113,6 +113,19 @@ def __init__(self, verbose=True): self.audio_output_options.append( option['human_device_name'] ) + # Create Airport device + try: + #airport_device = AirportDevice(self, self.audio_output_options, self.video_audio_output_options) + airport_device = AirportDevice(self, self.audio_output_options, self.video_audio_output_options) + #print(str(airport_device)); + self.handle_device_added( airport_device ) + #if self.DEBUG: + print("airport device created") + + except Exception as ex: + print("Could not create airport device: " + str(ex)) + + # Start streaming servers if self.audio: print("Enabling Shairport-sync airplay audio receiver") @@ -135,17 +148,7 @@ def __init__(self, verbose=True): self.set_video_audio_output(str(self.persistent_data['video_audio_output'])) - # Create Airport device - try: - #airport_device = AirportDevice(self, self.audio_output_options, self.video_audio_output_options) - airport_device = AirportDevice(self, self.audio_output_options, self.video_audio_output_options) - #print(str(airport_device)); - self.handle_device_added( airport_device ) - #if self.DEBUG: - print("airport device created") - except Exception as ex: - print("Could not create airport device: " + str(ex)) print("End of Airport adapter init process") @@ -268,7 +271,8 @@ def set_audio_output(self, selection): if self.DEBUG: print("new selection on thing: " + str(selection)) try: - #print("self.devices = " + str(self.devices)) + if self.DEBUG: + print("self.devices = " + str(self.devices)) if self.devices['airport'] != None: self.devices['airport'].properties['audio output'].update( str(selection) ) except Exception as ex: