| 1461 | } |
| 1462 | |
| 1463 | static void |
| 1464 | start_scan (signal_user_data_t *ud, const char *path, int title_id, int preview_count) |
| 1465 | { |
| 1466 | GtkWidget *widget; |
| 1467 | ghb_status_t status; |
| 1468 | |
| 1469 | ghb_get_status(&status); |
| 1470 | if (status.scan.state != GHB_STATE_IDLE) |
| 1471 | return; |
| 1472 | |
| 1473 | widget = ghb_builder_widget("sourcetoolbutton"); |
| 1474 | ghb_button_set_icon_name(GHB_BUTTON(widget), "hb-stop-small-symbolic"); |
| 1475 | ghb_button_set_label(GHB_BUTTON(widget), _("Stop Scan")); |
| 1476 | gtk_widget_set_tooltip_text(widget, _("Stop Scan")); |
| 1477 | widget = ghb_builder_widget("sourcetoolmenubutton"); |
| 1478 | gtk_widget_set_sensitive(widget, false); |
| 1479 | gboolean limit_max_duration = ghb_dict_get_bool(ud->prefs, "LimitMaxDuration"); |
| 1480 | ghb_backend_scan(path, title_id, preview_count, |
| 1481 | 90000L * ghb_dict_get_int(ud->prefs, "MinTitleDuration"), |
| 1482 | limit_max_duration ? 90000L * ghb_dict_get_int(ud->prefs, "MaxTitleDuration") : 0, |
| 1483 | ghb_dict_get_bool(ud->prefs, "KeepDuplicateTitles")); |
| 1484 | } |
| 1485 | |
| 1486 | static void |
| 1487 | start_scan_list (signal_user_data_t *ud, GListModel *files, int title_id, int preview_count) |
no test coverage detected