diff --git a/mopidy/http/actor.py b/mopidy/http/actor.py index 5fe29134..8b4835da 100644 --- a/mopidy/http/actor.py +++ b/mopidy/http/actor.py @@ -57,10 +57,12 @@ class HttpFrontend(pykka.ThreadingActor, CoreListener): if self.zeroconf_name: self.zeroconf_http = zeroconf.Zeroconf( - stype='_http._tcp', name=self.zeroconf_name, + name=self.zeroconf_name, + stype='_http._tcp', port=self.port) self.zeroconf_mopidy_http = zeroconf.Zeroconf( - stype='_mopidy-http._tcp', name=self.zeroconf_name, + name=self.zeroconf_name, + stype='_mopidy-http._tcp', port=self.port) self.zeroconf_http.publish() self.zeroconf_mopidy_http.publish() diff --git a/mopidy/mpd/actor.py b/mopidy/mpd/actor.py index 8eb59c1f..69d165ca 100644 --- a/mopidy/mpd/actor.py +++ b/mopidy/mpd/actor.py @@ -45,7 +45,8 @@ class MpdFrontend(pykka.ThreadingActor, CoreListener): def on_start(self): if self.zeroconf_name: self.zeroconf_service = zeroconf.Zeroconf( - stype='_mpd._tcp', name=self.zeroconf_name, + name=self.zeroconf_name, + stype='_mpd._tcp', port=self.port) self.zeroconf_service.publish() diff --git a/mopidy/zeroconf.py b/mopidy/zeroconf.py index ddd155b6..b5dd4f5d 100644 --- a/mopidy/zeroconf.py +++ b/mopidy/zeroconf.py @@ -37,8 +37,8 @@ class Zeroconf(object): Currently, this only works on Linux using Avahi via D-Bus. :param str name: human readable name of the service, e.g. 'MPD on neptune' - :param int port: TCP port of the service, e.g. 6600 :param str stype: service type, e.g. '_mpd._tcp' + :param int port: TCP port of the service, e.g. 6600 :param str domain: local network domain name, defaults to '' :param str host: interface to advertise the service on, defaults to all interfaces @@ -47,9 +47,9 @@ class Zeroconf(object): :type text: list of str """ - def __init__(self, name, port, stype=None, domain=None, text=None): + def __init__(self, name, stype, port, domain=None, text=None): self.group = None - self.stype = stype or '_http._tcp' + self.stype = stype self.domain = domain or '' self.port = port self.text = text or []