Add 'force' parameter to menu_database_realloc

This commit is contained in:
twinaphex 2015-02-03 02:54:48 +01:00
parent adbcab3912
commit 2197a7b5c0
3 changed files with 6 additions and 4 deletions

View File

@ -54,9 +54,10 @@ void menu_database_free(menu_handle_t *menu)
menu_database_playlist_free(menu);
}
bool menu_database_realloc(menu_handle_t *menu, const char *path)
bool menu_database_realloc(menu_handle_t *menu, const char *path,
bool force)
{
if (!strcmp(menu->db_playlist_file, path))
if (!strcmp(menu->db_playlist_file, path) && !force)
return true;
menu_database_playlist_free(menu);

View File

@ -32,7 +32,8 @@ int menu_database_populate_query(file_list_t *list, const char *path,
void menu_database_free(menu_handle_t *menu);
bool menu_database_realloc(menu_handle_t *menu, const char *path);
bool menu_database_realloc(menu_handle_t *menu, const char *path,
bool force);
#ifdef __cplusplus
}

View File

@ -879,7 +879,7 @@ static int deferred_push_rdb_entry_detail(void *data, void *userdata,
fill_pathname_join(path_rdl, g_settings.content_database, path_base,
sizeof(path_rdl));
menu_database_realloc(driver.menu, path_rdl);
menu_database_realloc(driver.menu, path_rdl, false);
playlist = driver.menu->db_playlist;