]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: config - update pathname according checkboxes (for old configs)
authorJaroslav Kysela <perex@perex.cz>
Mon, 1 Jun 2015 12:47:26 +0000 (14:47 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 1 Jun 2015 12:47:26 +0000 (14:47 +0200)
src/dvr/dvr_config.c

index 70937bd850bea647b3d486c253e51a5de2c87a5d..8753ee24481d296d9b8d93e1fc0f86f39ee66f34 100644 (file)
@@ -39,6 +39,7 @@ struct dvr_config_list dvrconfigs;
 static dvr_config_t *dvrdefaultconfig = NULL;
 
 static void dvr_config_destroy(dvr_config_t *cfg, int delconf);
+static void dvr_update_pathname_from_booleans(dvr_config_t *cfg);
 
 /**
  * find a dvr config by name, return NULL if not found
@@ -190,6 +191,8 @@ dvr_config_create(const char *name, const char *uuid, htsmsg_t *conf)
 
   if (conf) {
     idnode_load(&cfg->dvr_id, conf);
+    if (!htsmsg_field_find(conf, "pathname"))
+      dvr_update_pathname_from_booleans(cfg);
     cfg->dvr_valid = 1;
   }