diff --git a/README.md b/README.md index b1edb376..484a82a0 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,15 @@ Thus, to start it, just type: Settings are stored in `$HOME/.hts/tvheadend`. +How to build for OS X +--------------------- + +Same build procedure applies to OS X. +After build, the binary resides in `build.darwin` directory. + +Only network sources (IPTV, SAT>IP) are supported on OS X. +There is no support for DVB USB sticks and PCI cards. +Transcoding is currently not supported. Further information ------------------- diff --git a/src/avahi.c b/src/avahi.c index c84a2f21..d9e512b0 100644 --- a/src/avahi.c +++ b/src/avahi.c @@ -112,6 +112,7 @@ static void create_services(AvahiClient *c) { char *n; + char *path; int ret; assert(c); @@ -147,14 +148,18 @@ create_services(AvahiClient *c) goto fail; } + path = malloc(strlen(tvheadend_webroot) + 6); + sprintf(path, "path=%s", tvheadend_webroot); /* Add the service for HTTP */ if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_http._tcp", NULL, NULL, tvheadend_webui_port, - "path=/", + path, NULL)) < 0) { + free(path); + if (ret == AVAHI_ERR_COLLISION) goto collision; diff --git a/src/bonjour.c b/src/bonjour.c index b9e0205d..7b1ea909 100644 --- a/src/bonjour.c +++ b/src/bonjour.c @@ -104,12 +104,14 @@ void bonjour_init(void) { txt_rec_t txt_rec_http[] = { - { "path", "/" }, + { "path", tvheadend_webroot }, { .key = NULL } }; - bonjour_start_service(&svc_http, "_http._tcp", 9981, txt_rec_http); - bonjour_start_service(&svc_htsp, "_htsp._tcp", 9982, NULL); + bonjour_start_service(&svc_http, "_http._tcp", tvheadend_webui_port, + txt_rec_http); + + bonjour_start_service(&svc_htsp, "_htsp._tcp", tvheadend_htsp_port, NULL); } void