]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsp: Tidy serialization of category and keyword.
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Tue, 16 Oct 2018 18:50:39 +0000 (19:50 +0100)
committerperexg <perex@perex.cz>
Sun, 21 Oct 2018 17:43:22 +0000 (19:43 +0200)
src/htsp_server.c

index b1d3f207dca8846b9233abf039cf4436ad3c357e..6d1a7e07d226381acb6f115aca53822959371bdd 100644 (file)
@@ -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);