| 4199 | } |
| 4200 | |
| 4201 | static void |
| 4202 | submit_job(signal_user_data_t *ud, GhbValue *queueDict) |
| 4203 | { |
| 4204 | const char *name, *type, *modified; |
| 4205 | GhbValue *uiDict; |
| 4206 | gboolean preset_modified; |
| 4207 | |
| 4208 | ghb_log_func(); |
| 4209 | if (queueDict == NULL) return; |
| 4210 | uiDict = ghb_dict_get(queueDict, "uiSettings"); |
| 4211 | preset_modified = ghb_dict_get_bool(uiDict, "preset_modified"); |
| 4212 | name = ghb_dict_get_string(uiDict, "PresetFullName"); |
| 4213 | type = ghb_dict_get_int(uiDict, "Type") == 1 ? "Custom " : ""; |
| 4214 | modified = preset_modified ? "Modified " : ""; |
| 4215 | ghb_log("%s%sPreset: %s", modified, type, name); |
| 4216 | |
| 4217 | ghb_dict_set_int(uiDict, "job_status", GHB_QUEUE_RUNNING); |
| 4218 | start_new_log(ud, uiDict); |
| 4219 | GhbValue *job_dict = ghb_dict_get(queueDict, "Job"); |
| 4220 | int unique_id = ghb_add_job(ghb_queue_handle(), job_dict); |
| 4221 | ghb_dict_set_int(uiDict, "job_unique_id", unique_id); |
| 4222 | time_t now = time(NULL); |
| 4223 | ghb_dict_set_int(uiDict, "job_start_time", now); |
| 4224 | ghb_start_queue(); |
| 4225 | |
| 4226 | // Show queue progress bar |
| 4227 | int index = ghb_find_queue_job(ud->queue, unique_id, NULL); |
| 4228 | ghb_queue_item_set_status(ud, index, GHB_QUEUE_RUNNING); |
| 4229 | } |
| 4230 | |
| 4231 | static void |
| 4232 | prune_logs (void) |
no test coverage detected