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

Function ghb_do_scan_list

gtk/src/callbacks.c:1524–1572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1522static gchar *last_scan_file = NULL;
1523
1524void
1525ghb_do_scan_list (signal_user_data_t *ud, GListModel *files, int title_id, gboolean force)
1526{
1527 int titleindex;
1528
1529 if (!g_list_model_get_n_items(files))
1530 return;
1531
1532 g_autoptr(GFile) file = g_list_model_get_item(files, 0);
1533 const char *filename = g_file_peek_path(file);
1534
1535 ghb_log_func();
1536 if (!force && last_scan_file != NULL &&
1537 strcmp(last_scan_file, filename) == 0)
1538 {
1539 if (ghb_queue_edit_settings != NULL)
1540 {
1541 title_id = ghb_dict_get_int(ghb_queue_edit_settings, "title");
1542 ghb_lookup_title(title_id, &titleindex);
1543 ghb_array_replace(ud->settings_array, titleindex,
1544 ghb_queue_edit_settings);
1545 ud->settings = ghb_queue_edit_settings;
1546 ghb_load_settings(ud);
1547 ghb_queue_edit_settings = NULL;
1548 }
1549 else
1550 {
1551 ghb_lookup_title(title_id, &titleindex);
1552 load_all_titles(ud, titleindex);
1553 }
1554 return;
1555 }
1556 if (last_scan_file != NULL)
1557 g_free(last_scan_file);
1558 last_scan_file = NULL;
1559 if (filename != NULL)
1560 {
1561 gint preview_count;
1562
1563 last_scan_file = g_strdup(filename);
1564 ghb_set_scan_source(filename);
1565
1566 show_scan_progress(ud);
1567 prune_logs();
1568
1569 preview_count = ghb_dict_get_int(ud->prefs, "preview_count");
1570 start_scan_list(ud, files, title_id, preview_count);
1571 }
1572}
1573void
1574ghb_do_scan (signal_user_data_t *ud, const char *filename, int title_id, gboolean force)
1575{

Callers 2

video_file_drop_receivedFunction · 0.85
source_dialog_start_scanFunction · 0.85

Calls 8

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
prune_logsFunction · 0.85
start_scan_listFunction · 0.85

Tested by

no test coverage detected