Skip to content
Snippets Groups Projects
Commit b782759a authored by Jess Ward's avatar Jess Ward
Browse files

removed old file

parent 499ad77a
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment