--- tvheadend/src/satip/server.c 2016-03-31 02:00:18.256113356 +0200 +++ tvheadend/src/satip/server.c 2016-03-31 01:58:43.592108842 +0200 @@ -132,7 +132,13 @@ satip_server_http_xml(http_connection_t htsbuf_queue_init(&q, 0); - pthread_mutex_lock(&global_lock); + if (satip_server_conf.satip_force_tuners) + { + tvhwarn("satips", "SAT>IP server forcing the number of exported tuners"); + } + else + { + pthread_mutex_lock(&global_lock); LIST_FOREACH(mn, &mpegts_network_all, mn_global_link) { if (mn->mn_satip_source == 0) continue; @@ -157,17 +163,18 @@ satip_server_http_xml(http_connection_t } #endif } + pthread_mutex_unlock(&global_lock); + } for (p = xtab; p->id; p++) { i = *p->cptr; if (i > 0) { tuners += i; - if (*p->count && i > 0) { + if ((*p->count && i > 0) || (satip_server_conf.satip_force_tuners && (i>0))) { htsbuf_qprintf(&q, "%s%s-%d", delim ? "," : "", p->id, i); delim++; } } } - pthread_mutex_unlock(&global_lock); if (!dvbs) srcs = 0; @@ -669,6 +676,17 @@ const idclass_t satip_server_class = { .opts = PO_EXPERT, .group = 1, }, + { + .type = PT_BOOL, + .id = "satip_force_tuners", + .name = N_("Force export tuners"), + .desc = N_("Force to export manual number of tuners specified " + "(Usually useful with the IPTV input and " + "without physical tuners)."), + .off = offsetof(struct satip_server_conf, satip_force_tuners), + .opts = PO_EXPERT, + .group = 1, + }, { .type = PT_INT, .id = "satip_dvbs", --- tvheadend/src/satip/server.h 2016-03-31 02:09:00.072138238 +0200 +++ tvheadend/src/satip/server.h 2016-03-31 01:58:43.604108842 +0200 @@ -53,6 +53,7 @@ struct satip_server_conf { int satip_dvbc2; int satip_atsc_t; int satip_atsc_c; + int satip_force_tuners; char *satip_nat_ip; };