| 1571 | } |
| 1572 | } |
| 1573 | void |
| 1574 | ghb_do_scan (signal_user_data_t *ud, const char *filename, int title_id, gboolean force) |
| 1575 | { |
| 1576 | int titleindex; |
| 1577 | |
| 1578 | ghb_log_func(); |
| 1579 | if (!force && last_scan_file != NULL && |
| 1580 | strcmp(last_scan_file, filename) == 0) |
| 1581 | { |
| 1582 | if (ghb_queue_edit_settings != NULL) |
| 1583 | { |
| 1584 | title_id = ghb_dict_get_int(ghb_queue_edit_settings, "title"); |
| 1585 | ghb_lookup_title(title_id, &titleindex); |
| 1586 | ghb_array_replace(ud->settings_array, titleindex, |
| 1587 | ghb_queue_edit_settings); |
| 1588 | ud->settings = ghb_queue_edit_settings; |
| 1589 | ghb_load_settings(ud); |
| 1590 | ghb_queue_edit_settings = NULL; |
| 1591 | } |
| 1592 | else |
| 1593 | { |
| 1594 | ghb_lookup_title(title_id, &titleindex); |
| 1595 | load_all_titles(ud, titleindex); |
| 1596 | } |
| 1597 | return; |
| 1598 | } |
| 1599 | if (last_scan_file != NULL) |
| 1600 | g_free(last_scan_file); |
| 1601 | last_scan_file = NULL; |
| 1602 | if (filename != NULL) |
| 1603 | { |
| 1604 | const gchar *path; |
| 1605 | gint preview_count; |
| 1606 | |
| 1607 | last_scan_file = g_strdup(filename); |
| 1608 | ghb_set_scan_source(filename); |
| 1609 | |
| 1610 | show_scan_progress(ud); |
| 1611 | path = ghb_get_scan_source(); |
| 1612 | prune_logs(); |
| 1613 | |
| 1614 | preview_count = ghb_dict_get_int(ud->prefs, "preview_count"); |
| 1615 | start_scan(ud, path, title_id, preview_count); |
| 1616 | } |
| 1617 | } |
| 1618 | |
| 1619 | static void |
| 1620 | single_title_dialog_response (GtkMessageDialog *dialog, int response, |
no test coverage detected