libsaria: Report the library size as the play_list size
This is simpler than looping over all library paths and adding up their individual sizes.
This commit is contained in:
parent
637ea47a60
commit
cdcaaeb8c8
|
@ -70,15 +70,6 @@ namespace libsaria
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int library::size()
|
|
||||||
{
|
|
||||||
unsigned int size = 0;
|
|
||||||
list<LibraryPath>::iterator it;
|
|
||||||
for (it = path_list.begin(); it != path_list.end(); it++)
|
|
||||||
size += it->size();
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void library::refresh()
|
void library::refresh()
|
||||||
{
|
{
|
||||||
rebuild_list();
|
rebuild_list();
|
||||||
|
|
|
@ -15,6 +15,8 @@ namespace libsaria
|
||||||
list<LibraryPath>::iterator it;
|
list<LibraryPath>::iterator it;
|
||||||
list<TrackTag> *tag_list;
|
list<TrackTag> *tag_list;
|
||||||
|
|
||||||
|
play_list.clear();
|
||||||
|
|
||||||
for (it = path_list->begin(); it != path_list->end(); it++) {
|
for (it = path_list->begin(); it != path_list->end(); it++) {
|
||||||
tag_list = it->get_list();
|
tag_list = it->get_list();
|
||||||
play_list.insert(play_list.end(), tag_list->begin(), tag_list->end());
|
play_list.insert(play_list.end(), tag_list->begin(), tag_list->end());
|
||||||
|
@ -22,4 +24,9 @@ namespace libsaria
|
||||||
println("Rebuilding play list");
|
println("Rebuilding play list");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int library::size()
|
||||||
|
{
|
||||||
|
return play_list.size();
|
||||||
|
}
|
||||||
|
|
||||||
}; /* Namespace: libsaria */
|
}; /* Namespace: libsaria */
|
||||||
|
|
Loading…
Reference in New Issue