MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_do_scan

Function ghb_do_scan

gtk/src/callbacks.c:1573–1617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1571 }
1572}
1573void
1574ghb_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
1619static void
1620single_title_dialog_response (GtkMessageDialog *dialog, int response,

Callers 4

video_file_drop_receivedFunction · 0.85
ghb_idle_scanFunction · 0.85
dvd_source_activate_cbFunction · 0.85
queue_edit_action_cbFunction · 0.85

Calls 9

ghb_dict_get_intFunction · 0.85
ghb_lookup_titleFunction · 0.85
ghb_load_settingsFunction · 0.85
load_all_titlesFunction · 0.85
ghb_set_scan_sourceFunction · 0.85
show_scan_progressFunction · 0.85
ghb_get_scan_sourceFunction · 0.85
prune_logsFunction · 0.85
start_scanFunction · 0.85

Tested by

no test coverage detected