From e9b300438573297bbe513da962cd97cc63205915 Mon Sep 17 00:00:00 2001 From: "E.Smith" <31170571+azlm8t@users.noreply.github.com> Date: Sat, 29 Sep 2018 14:03:44 +0100 Subject: [PATCH] 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. --- src/webui/xmltv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); + } } /* -- 2.47.2