]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
idnode: added saving on update of properties
authorAdam Sutton <dev@adamsutton.me.uk>
Tue, 11 Jun 2013 12:53:48 +0000 (13:53 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Tue, 11 Jun 2013 12:53:48 +0000 (13:53 +0100)
This needs some serious tidying up

src/idnode.c
src/idnode.h

index a1e18262d0dca01655e3f69e2d13675873c49846..e8f356d5a1ca478f3781d6b9fa4e8a45e9c2009c 100644 (file)
@@ -361,13 +361,15 @@ idnode_save ( idnode_t *self, htsmsg_t *c )
  * Load
  */
 void
-idnode_load ( idnode_t *self, htsmsg_t *c )
+idnode_load ( idnode_t *self, htsmsg_t *c, int dosave )
 {
   const idclass_t *idc = self->in_class;
   while (idc) {
     prop_write_values(self, idc->ic_properties, c);
     idc = idc->ic_super;
   }
+  if (dosave)
+    idnode_updated(self);
 }
 
 static const property_t *
index 478ae8dea07e1a9742bcaf9e0ab8463d58f74fc0..947a0a315bcf4222d054b5085c1c53ef2aa5703a 100644 (file)
@@ -98,7 +98,7 @@ void idnode_update_all_props(idnode_t *in,
 void idnode_notify_title_changed(void *obj);
 
 void idnode_save ( idnode_t *self, htsmsg_t *m );
-void idnode_load ( idnode_t *self, htsmsg_t *m );
+void idnode_load ( idnode_t *self, htsmsg_t *m, int dosave );
 
 const char *idnode_get_str ( idnode_t *self, const char *key );
 int idnode_get_u32(idnode_t *self, const char *key, uint32_t *u32);