Feature #4461 » 0003-hdhomerun-Use-servername-as-Friendly-Name.-4461.patch
src/htsbuf.c | ||
---|---|---|
539 | 539 | |
540 | 540 | |
541 | 541 | |
542 |
void htsbuf_append_and_escape_jsonstr_nv(htsbuf_queue_t *hq, const char *name, const char *value) |
|
543 |
{ |
|
544 |
htsbuf_append_and_escape_jsonstr(hq, name); |
|
545 |
htsbuf_append_str(hq, ": "); |
|
546 |
htsbuf_append_and_escape_jsonstr(hq, value); |
|
547 |
} |
|
548 | ||
549 | ||
550 | ||
542 | 551 |
/** |
543 | 552 |
* |
544 | 553 |
*/ |
src/htsbuf.h | ||
---|---|---|
82 | 82 |
void htsbuf_append_and_escape_rfc8187(htsbuf_queue_t *hq, const char *s); |
83 | 83 | |
84 | 84 |
void htsbuf_append_and_escape_jsonstr(htsbuf_queue_t *hq, const char *s); |
85 |
/** Append a name and value JSON string */ |
|
86 |
void htsbuf_append_and_escape_jsonstr_nv(htsbuf_queue_t *hq, const char *name, const char *value); |
|
85 | 87 | |
86 | 88 |
void htsbuf_dump_raw_stderr(htsbuf_queue_t *hq); |
87 | 89 |
src/webui/webui.c | ||
---|---|---|
1626 | 1626 |
tcp_get_str_from_ip(hc->hc_self, http_ip, sizeof(http_ip)); |
1627 | 1627 | |
1628 | 1628 |
/* The contents below for the discovery message are based on tvhProxy */ |
1629 |
htsbuf_qprintf(hq, "{ " \ |
|
1629 |
htsbuf_append_str(hq, "{ "); |
|
1630 |
htsbuf_append_and_escape_jsonstr_nv(hq, "FriendlyName", server_name); |
|
1631 |
htsbuf_qprintf(hq, ", " \ |
|
1630 | 1632 |
"\"BaseURL\" : \"http://%s:%u\", " \ |
1631 | 1633 |
"\"DeviceAuth\": \"none\", " \ |
1632 | 1634 |
"\"DeviceID\": \"%08X\", " \ |
1633 | 1635 |
"\"FirmwareName\": \"hdhomerun_atsc\", " \ |
1634 | 1636 |
"\"FirmwareVersion\": \"20200101\", " \ |
1635 |
"\"FriendlyName\": \"tvheadend\", " \ |
|
1636 | 1637 |
"\"LineupURL\": \"http://%s:%u/lineup.json\", " \ |
1637 | 1638 |
"\"Manufacturer\": \"Silicondust\", " \ |
1638 | 1639 |
"\"ModelNumber\": \"HDTC-2US\", " \ |
1639 |
- |