libsaria: Added library::update()

This will rescan every library path and add new files to the library.
Eventually it should probably remove files that no longer exist...
This commit is contained in:
Bryan Schumaker 2011-10-20 13:22:21 -04:00
parent 60dc610195
commit c4cdfbe4b3
2 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,7 @@ namespace libsaria
void load();
void save();
void update();
void refresh();
void add_path(string);

View File

@ -69,6 +69,13 @@ namespace libsaria
it->second.get_info(info_func);
}
void library::update()
{
map<string, LibraryPath>::iterator it;
for (it = path_map.begin(); it != path_map.end(); it++)
it->second.update();
}
void library::play_id(ino_t id)
{
map<string, LibraryPath>::iterator it;