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:
parent
becf7f94bc
commit
eff294a7c7
|
@ -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())
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue