diff --git a/snapcast.py b/snapcast.py deleted file mode 100644 index 0aecb224446df26f1b89572d1c31c932520827fa..0000000000000000000000000000000000000000 --- a/snapcast.py +++ /dev/null @@ -1,35 +0,0 @@ -from zeroconf import ServiceBrowser, Zeroconf -import snapcast.control - - -class Scanner: - - services = [] - - def remove_service(self, zeroconf, type, name): - print("Service %s removed" % (name,)) - - def add_service(self, zeroconf, type, name): - info = zeroconf.get_service_info(type, name) - self.services.append(info) - - -def get_snapcast_server(services): - '''scan for services then find snapcast server''' - zeroconf = Zeroconf() - listener = Scanner() - ServiceBrowser(zeroconf, "_snapcast._tcp.local.", listener) - server = snapcast.control.Snapserver(services, snapcast.control. - CONTROL.PORT) - - while services == []: - pass - return server - - -def get_snapcast_client(server): - '''scan through list of clients to find correct one''' - for client in server.clients: - print(client.name) - print(client.identifier) - # TODO Scroll through list of clients and find right one