From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Tue, 16 Oct 2018 18:50:39 +0000 (+0100) Subject: htsp: Tidy serialization of category and keyword. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64afb2e0c931e00a3fcc538806e1c40391c7cd7f;p=thirdparty%2Ftvheadend.git htsp: Tidy serialization of category and keyword. --- diff --git a/src/htsp_server.c b/src/htsp_server.c index b1d3f207d..6d1a7e07d 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -1282,15 +1282,12 @@ htsp_build_event htsmsg_add_str(out, "description", str); } - if (e->credits) { + if (e->credits) htsmsg_add_msg(out, "credits", htsmsg_copy(e->credits)); - } - if (e->category) { - htsmsg_add_msg(out, "category", string_list_to_htsmsg(e->category)); - } - if (e->keyword) { - htsmsg_add_msg(out, "keyword", string_list_to_htsmsg(e->keyword)); - } + if (e->category) + string_list_serialize(e->category, out, "category"); + if (e->keyword) + string_list_serialize(e->keyword, out, "keyword"); if (e->serieslink) htsmsg_add_str(out, "serieslinkUri", e->serieslink->uri);