From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Sat, 29 Sep 2018 13:03:44 +0000 (+0100) Subject: xmltv: Use format "X" instead of "X/" for season/episode export. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9b300438573297bbe513da962cd97cc63205915;p=thirdparty%2Ftvheadend.git xmltv: Use format "X" instead of "X/" for season/episode export. Previously we'd output "4/ . 3/. /", but some clients can not handle the omitted "total" number. So we now output the simpler "4 . 3 ." instead. --- diff --git a/src/webui/xmltv.c b/src/webui/xmltv.c index cf62f061f..a73918988 100644 --- a/src/webui/xmltv.c +++ b/src/webui/xmltv.c @@ -105,8 +105,13 @@ _http_xmltv_add_episode_num(htsbuf_queue_t *hq, uint16_t num, uint16_t cnt) * counts are one-based. */ if (num) htsbuf_qprintf(hq, "%d", num - 1); - htsbuf_append_str(hq, "/"); - if (cnt) htsbuf_qprintf(hq, "%d", cnt); + /* Some clients can not handle "X", only "X/Y" or "/Y", + * so only output "/" if needed. + */ + if (cnt) { + htsbuf_append_str(hq, "/"); + htsbuf_qprintf(hq, "%d", cnt); + } } /*