| 1304 | } |
| 1305 | |
| 1306 | void ghb_queue_update_status (signal_user_data_t *ud, int index, int status) |
| 1307 | { |
| 1308 | int count = ghb_array_len(ud->queue); |
| 1309 | if (index < 0 || index >= count) |
| 1310 | { |
| 1311 | // invalid index |
| 1312 | return; |
| 1313 | } |
| 1314 | |
| 1315 | GhbValue * queueDict, * uiDict; |
| 1316 | queueDict = ghb_array_get(ud->queue, index); |
| 1317 | if (queueDict == NULL) // should never happen |
| 1318 | { |
| 1319 | return; |
| 1320 | } |
| 1321 | uiDict = ghb_dict_get(queueDict, "uiSettings"); |
| 1322 | if (uiDict == NULL) // should never happen |
| 1323 | { |
| 1324 | return; |
| 1325 | } |
| 1326 | |
| 1327 | if (ghb_dict_get_int(uiDict, "job_status") == GHB_QUEUE_RUNNING) |
| 1328 | { |
| 1329 | return; // Never change the status of currently running jobs |
| 1330 | } |
| 1331 | |
| 1332 | ghb_dict_set_int(uiDict, "job_status", status); |
| 1333 | ghb_queue_item_set_status(ud, index, status); |
| 1334 | } |
| 1335 | |
| 1336 | static void |
| 1337 | queue_update_all_status (signal_user_data_t *ud, int status) |
no test coverage detected