tasks update

This commit is contained in:
jakani24
2024-02-17 15:20:28 +01:00
parent a500befd06
commit b648ac440e
4 changed files with 14 additions and 0 deletions

View File

@@ -54,6 +54,11 @@ int start_thread(const char* command) {
std::thread t1(action_update_settings);
t1.detach();
}
else if (strcmp(out1, "update_db") == 0) {
//start a new thread with the scanfolder function
std::thread t1(action_update_settings);
t1.detach();
}
while (can_run_thread()) {
//delay a bit, in order to wait until the thread is started

View File

@@ -88,4 +88,8 @@ int action_update_settings() {
}
return err;
}
int action_update_db() {
//update the databases
return update_db(DB_DIR);
}
#endif