]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
HTSP: Expose is_new flag in EPG event data
authorJames Hutchinson <jahutchinson99@googlemail.com>
Wed, 4 Jun 2025 10:46:01 +0000 (11:46 +0100)
committerFlole <Flole998@users.noreply.github.com>
Wed, 4 Jun 2025 17:55:07 +0000 (19:55 +0200)
This commit adds the is_new flag to the EPG event data sent to HTSP clients.
By including this property, clients such as Kodi (with the pvr.hts addon)
can now detect whether a broadcast is marked as new and set corresponding
flags (e.g. EPG_TAG_FLAG_IS_NEW in Kodi).

This enhances the metadata available to clients and supports improved EPG
event handling and display.

A corresponding pull request will also be submitted to the pvr.hts project
to make use of this flag when obtaining EPG event guide data from Tvheadend.

src/htsp_server.c

index 9a78088a631e3c465a6af8a7317888d72fd15dd5..223ce45b4a31ce976c5859bceae1ddf0135137e3 100644 (file)
@@ -51,7 +51,7 @@
 
 static void *htsp_server, *htsp_server_2;
 
-#define HTSP_PROTO_VERSION 42
+#define HTSP_PROTO_VERSION 43
 
 #define HTSP_ASYNC_OFF  0x00
 #define HTSP_ASYNC_ON   0x01
@@ -1430,6 +1430,8 @@ htsp_build_event
     htsmsg_add_u32(out, "copyrightYear", e->copyright_year);
   if (e->first_aired)
     htsmsg_add_s64(out, "firstAired", e->first_aired);
+  if (e->is_new)
+    htsmsg_add_u32(out, "isNew", e->is_new);
   epg_broadcast_get_epnum(e, &epnum);
   htsp_serialize_epnum(out, &epnum, NULL);
   if (!strempty(e->image))