dvr: migrate config v8 -> v9
This commit is contained in:
parent
00464a8deb
commit
bee6c8ee2e
1 changed files with 16 additions and 1 deletions
17
src/config.c
17
src/config.c
|
@ -642,7 +642,8 @@ config_migrate_simple ( const char *dir, htsmsg_t **orig,
|
|||
htsmsg_delete_field(e, "id");
|
||||
htsmsg_add_u32(e, "index", index++);
|
||||
uuid_init_hex(&u, NULL);
|
||||
modify(e, id, u.hex, aux);
|
||||
if (modify)
|
||||
modify(e, id, u.hex, aux);
|
||||
hts_settings_save(e, "%s/%s", dir, u.hex);
|
||||
hts_settings_remove("%s/%s", dir, f->hmf_name);
|
||||
}
|
||||
|
@ -731,6 +732,19 @@ config_migrate_v8 ( void )
|
|||
htsmsg_destroy(ch);
|
||||
}
|
||||
|
||||
static void
|
||||
config_modify_dvr_log( htsmsg_t *c, uint32_t id, const char *uuid, void *aux )
|
||||
{
|
||||
htsmsg_delete_field(c, "index");
|
||||
}
|
||||
|
||||
static void
|
||||
config_migrate_v9 ( void )
|
||||
{
|
||||
config_migrate_simple("autorec", NULL, NULL, NULL);
|
||||
config_migrate_simple("dvr/log", NULL, config_modify_dvr_log, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Migration table
|
||||
*/
|
||||
|
@ -743,6 +757,7 @@ static const config_migrate_t config_migrate_table[] = {
|
|||
config_migrate_v6,
|
||||
config_migrate_v7,
|
||||
config_migrate_v8,
|
||||
config_migrate_v9,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue