libsaria: Added function for getting the library size
I like to show this on the library tab so I know how many songs are currently in the library.
This commit is contained in:
parent
a508b7ff72
commit
8cf3caeb27
|
@ -18,6 +18,8 @@ namespace libsaria
|
|||
void add_path(string);
|
||||
void play_id(ino_t);
|
||||
void for_each(void (*)(Track &));
|
||||
|
||||
unsigned int size();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,15 @@ namespace libsaria
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int library::size()
|
||||
{
|
||||
unsigned int size = 0;
|
||||
map<string, LibraryPath>::iterator it;
|
||||
for (it = path_map.begin(); it != path_map.end(); it++)
|
||||
size += it->second.size();
|
||||
return size;
|
||||
}
|
||||
|
||||
void library::refresh()
|
||||
{
|
||||
trigger_callback(LIBRARY_REFRESH);
|
||||
|
|
Loading…
Reference in New Issue