library: Added an update_all() function

To update all paths in a library.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
Anna Schumaker 2014-01-12 13:04:16 -05:00 committed by Anna Schumaker
parent becf7f94bc
commit eff294a7c7
2 changed files with 8 additions and 1 deletions

View File

@ -464,6 +464,13 @@ void library :: update_path(unsigned int id)
do_update_library(id);
}
void library :: update_all()
{
unsigned int i;
for (i = library_db.first(); i < library_db.num_rows(); i = library_db.next(i))
update_path(i);
}
void library :: lookup(unsigned int id, library :: Song *song)
{
if (id >= track_db.num_rows())

View File

@ -233,7 +233,7 @@ void test_6()
fflush(stdout);
gen_library();
fflush(stdout);
library :: update_path(0);
library :: update_all();
run_idle_tasks();
library :: print_db(library :: DB_TRACK);
print("\n");