]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Send 'initialSyncCompleted' when all initial channel / tag messages has
authorAndreas Öman <andreas@lonelycoder.com>
Mon, 13 Apr 2009 21:05:45 +0000 (21:05 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 13 Apr 2009 21:05:45 +0000 (21:05 +0000)
been sent.

Bump announced HTSP version to 2.

src/htsp.c

index 030faa7f071d06c37b298866616e0cbfa8753b43..da5fe18883e107994bdbbf5e92a3d53e89fd625c 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "htsmsg_binary.h"
 
-#define HTSP_PROTO_VERSION 1
+#define HTSP_PROTO_VERSION 2
 
 #define HTSP_PRIV_MASK (ACCESS_STREAMING)
 
@@ -363,6 +363,7 @@ htsp_method_async(htsp_connection_t *htsp, htsmsg_t *in)
 {
   channel_t *ch;
   channel_tag_t *ct;
+  htsmsg_t *m;
 
   /* First, just OK the async request */
   htsp_reply(htsp, in, htsmsg_create_map()); 
@@ -386,6 +387,11 @@ htsp_method_async(htsp_connection_t *htsp, htsmsg_t *in)
     if(ct->ct_enabled && !ct->ct_internal)
       htsp_send_message(htsp, htsp_build_tag(ct, "tagUpdate", 1), NULL);
 
+  /* Notify that initial sync has been completed */
+  m = htsmsg_create_map();
+  htsmsg_add_str(m, "method", "initialSyncCompleted");
+  htsp_send_message(htsp, m, NULL);
+
   /* Insert in list so it will get all updates */
   LIST_INSERT_HEAD(&htsp_async_connections, htsp, htsp_async_link);