tasks update
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -88,4 +88,8 @@ int action_update_settings() {
|
||||
}
|
||||
return err;
|
||||
}
|
||||
int action_update_db() {
|
||||
//update the databases
|
||||
return update_db(DB_DIR);
|
||||
}
|
||||
#endif
|
||||
@@ -425,6 +425,7 @@ function load_settings(){
|
||||
<option value="scanfile">scanfile</option>
|
||||
<option value="scanfolder">scanfolder</option>
|
||||
<option value="update_settings">update settings</option>
|
||||
<option value="update_db">update database</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" id="task_argument" class="form-control" name="task_argument"></td>
|
||||
@@ -465,6 +466,10 @@ function load_settings(){
|
||||
echo('<option value="update_settings" selected>update settings</option>');
|
||||
else
|
||||
echo('<option value="update_settings">update settings</option>');
|
||||
if($action=="update_settings")
|
||||
echo('<option value="update_db" selected>update database</option>');
|
||||
else
|
||||
echo('<option value="update_db">update database</option>');
|
||||
echo('</select>');
|
||||
echo('</td>');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user